diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-01-24 09:06:45 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-01-24 09:06:45 -0500 |
commit | 8485ad1410f790abbd3bb2c019b4657241586f57 (patch) | |
tree | 04c8fdbe938b0c746711353ef0960480ce36f2b6 /Python/formatter_unicode.c | |
parent | 3ef2f8c296ec144586fe35babbaf9d644c7ad222 (diff) | |
parent | 91ecea24f53b99aa190f6b17c2b51d95cb09d233 (diff) | |
download | cpython-git-8485ad1410f790abbd3bb2c019b4657241586f57.tar.gz |
merge heads
Diffstat (limited to 'Python/formatter_unicode.c')
-rw-r--r-- | Python/formatter_unicode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index 609ac16899..eee99134ad 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -682,7 +682,7 @@ format_string_internal(PyObject *value, const InternalFormatSpec *format) Py_ssize_t pos; Py_ssize_t len = PyUnicode_GET_LENGTH(value); PyObject *result = NULL; - int maxchar = 127; + Py_UCS4 maxchar = 127; /* sign is not allowed on strings */ if (format->sign != '\0') { @@ -749,7 +749,7 @@ format_int_or_long_internal(PyObject *value, const InternalFormatSpec *format, IntOrLongToString tostring) { PyObject *result = NULL; - int maxchar = 127; + Py_UCS4 maxchar = 127; PyObject *tmp = NULL; Py_ssize_t inumeric_chars; Py_UCS4 sign_char = '\0'; @@ -798,7 +798,7 @@ format_int_or_long_internal(PyObject *value, const InternalFormatSpec *format, tmp = PyUnicode_FromOrdinal(x); inumeric_chars = 0; n_digits = 1; - maxchar = Py_MAX(maxchar, x); + maxchar = Py_MAX(maxchar, (Py_UCS4)x); /* As a sort-of hack, we tell calc_number_widths that we only have "remainder" characters. calc_number_widths thinks @@ -926,7 +926,7 @@ format_float_internal(PyObject *value, NumberFieldWidths spec; int flags = 0; PyObject *result = NULL; - int maxchar = 127; + Py_UCS4 maxchar = 127; Py_UCS4 sign_char = '\0'; int float_type; /* Used to see if we have a nan, inf, or regular float. */ PyObject *unicode_tmp = NULL; @@ -1070,7 +1070,7 @@ format_complex_internal(PyObject *value, NumberFieldWidths im_spec; int flags = 0; PyObject *result = NULL; - int maxchar = 127; + Py_UCS4 maxchar = 127; int rkind; void *rdata; Py_ssize_t index; |