summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2007-08-27 23:30:47 +0000
committerEric Smith <eric@trueblade.com>2007-08-27 23:30:47 +0000
commit7a6dd290672a8add669e2637839366f7fe3a3870 (patch)
tree3811411d48bf141058b7ff1940ca1de9f798794d /Objects/unicodeobject.c
parent7dcb844892bbcc7e06e8cde5d7d153bb7ea3fda5 (diff)
downloadcpython-git-7a6dd290672a8add669e2637839366f7fe3a3870.tar.gz
Cleanup in anticipation of moving formatteriterator and fieldnameiterator into stringlib/string_format.h.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 5593ada3ee..afe0e184ab 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8209,7 +8209,7 @@ fieldnameiter_next(fieldnameiterobject *it)
if (idx != -1)
obj = PyInt_FromSsize_t(idx);
else
- obj = STRINGLIB_NEW(name.ptr, name.end - name.ptr);
+ obj = SubString_new_object(&name);
if (obj == NULL)
goto error;
@@ -8301,7 +8301,7 @@ unicode_formatter_field_name_split(PyUnicodeObject *self)
first_obj = PyInt_FromSsize_t(first_idx);
else
/* convert "first" into a string object */
- first_obj = STRINGLIB_NEW(first.ptr, first.end - first.ptr);
+ first_obj = SubString_new_object(&first);
if (first_obj == NULL)
goto error;