summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/formatter.h
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2008-06-24 01:06:47 (GMT)
committerEric Smith <eric@trueblade.com>2008-06-24 01:06:47 (GMT)
commit6d7e7a730e05dbf3511f94df400984dd5b7bdfdc (patch)
treef895c365c8f5f3de34dff5939667effdeb5409b1 /Objects/stringlib/formatter.h
parent7d84055e253f96437f1681faa3614ecd204b0a49 (diff)
downloadcpython-6d7e7a730e05dbf3511f94df400984dd5b7bdfdc.zip
cpython-6d7e7a730e05dbf3511f94df400984dd5b7bdfdc.tar.gz
cpython-6d7e7a730e05dbf3511f94df400984dd5b7bdfdc.tar.bz2
Merged revisions 64491 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r64491 | eric.smith | 2008-06-23 20:42:10 -0400 (Mon, 23 Jun 2008) | 1 line Modified interface to _Py_[String|Unicode]InsertThousandsGrouping, in anticipation of fixing issue 3140. ........
Diffstat (limited to 'Objects/stringlib/formatter.h')
-rw-r--r--Objects/stringlib/formatter.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/stringlib/formatter.h b/Objects/stringlib/formatter.h
index 2bb2ed2..12e2931 100644
--- a/Objects/stringlib/formatter.h
+++ b/Objects/stringlib/formatter.h
@@ -563,8 +563,7 @@ format_int_or_long_internal(PyObject *value, const InternalFormatSpec *format,
if (format->type == 'n')
/* Compute how many additional chars we need to allocate
to hold the thousands grouping. */
- STRINGLIB_GROUPING(pnumeric_chars, n_digits,
- pnumeric_chars+n_digits,
+ STRINGLIB_GROUPING(NULL, n_digits, n_digits,
0, &n_grouping_chars, 0);
/* Allocate a new string to hold the result */
@@ -592,8 +591,7 @@ format_int_or_long_internal(PyObject *value, const InternalFormatSpec *format,
/* We know this can't fail, since we've already
reserved enough space. */
STRINGLIB_CHAR *pstart = p + n_leading_chars;
- int r = STRINGLIB_GROUPING(pstart, n_digits,
- pstart + n_digits,
+ int r = STRINGLIB_GROUPING(pstart, n_digits, n_digits,
spec.n_total+n_grouping_chars-n_leading_chars,
NULL, 0);
assert(r);