Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 42894:6b4781dc81ff
Fix refleaks in test_unicode and test_string related to the new format code.
Stop polluting namespace.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 27 Aug 2007 07:24:17 +0000 |
| parents | 5fd65e250843 |
| children | 7bf8f2339ec6 |
line wrap: on
line diff
--- a/Python/sysmodule.c Mon Aug 27 06:19:22 2007 +0000 +++ b/Python/sysmodule.c Mon Aug 27 07:24:17 2007 +0000 @@ -663,7 +663,7 @@ /* sys_formatter_iterator is used to implement string.Formatter.vformat. it parses a string and returns tuples describing the parsed elements. see unicodeobject.c's - _unicodeformatter_iterator for details */ + _PyUnicode_FormatterIterator for details */ static PyObject * sys_formatter_iterator(PyObject *self, PyObject *args) { @@ -680,14 +680,14 @@ return NULL; } - return _unicodeformatter_iterator(str); + return _PyUnicode_FormatterIterator(str); } /* sys_formatter_field_name_split is used to implement string.Formatter.vformat. it takes an PEP 3101 "field name", and returns a tuple of (first, rest): "first", the part before the first '.' or '['; and "rest", an iterator for the rest of the field - name. see unicodeobjects' _unicode_formatter_field_name_split for + name. see unicodeobjects' _PyUnicode_FormatterFieldNameSplit for details */ static PyObject * sys_formatter_field_name_split(PyObject *self, PyObject *args) @@ -704,7 +704,7 @@ return NULL; } - return _unicodeformatter_field_name_split(field_name); + return _PyUnicode_FormatterFieldNameSplit(field_name); }
