Cleanup in anticipation of moving formatteriterator and fieldnameiterator into stringlib/string_format.h.

This commit is contained in:
Eric Smith 2007-08-27 23:30:47 +00:00
parent 7dcb844892
commit 7a6dd29067
2 changed files with 9 additions and 25 deletions

View file

@ -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;