Refactor and clean up str.format() code (and helpers) in advance of optimizations.

This commit is contained in:
Eric Smith 2008-05-30 18:10:19 +00:00
parent eb2c964aeb
commit 4a7d76ddb5
10 changed files with 98 additions and 99 deletions

View file

@ -127,6 +127,12 @@ PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
appending a base prefix of 0[box] if base is 2, 8 or 16. */
PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base);
/* Format the object based on the format_spec, as defined in PEP 3101
(Advanced String Formatting). */
PyAPI_FUNC(PyObject *) _PyLong_FormatAdvanced(PyObject *obj,
Py_UNICODE *format_spec,
Py_ssize_t format_spec_len);
/* These aren't really part of the long object, but they're handy. The
functions are in Python/mystrtoul.c.
*/