Commit e00f9c27 authored by Stefan Behnel's avatar Stefan Behnel

Fix C compiler warning about implicit integer downsizing.

Closes #2194.
parent b91c48cc
...@@ -678,8 +678,8 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid ...@@ -678,8 +678,8 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid
// 'dpos' points to end of digits array + 1 initially to allow for pre-decrement looping // 'dpos' points to end of digits array + 1 initially to allow for pre-decrement looping
char *dpos, *end = digits + sizeof({{TYPE}})*3+2; char *dpos, *end = digits + sizeof({{TYPE}})*3+2;
const char *hex_digits = DIGITS_HEX; const char *hex_digits = DIGITS_HEX;
Py_ssize_t ulength; Py_ssize_t length, ulength;
int length, prepend_sign, last_one_off; int prepend_sign, last_one_off;
{{TYPE}} remaining; {{TYPE}} remaining;
const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0;
const int is_unsigned = neg_one > const_zero; const int is_unsigned = neg_one > const_zero;
...@@ -743,7 +743,7 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid ...@@ -743,7 +743,7 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid
if (ulength == 1) { if (ulength == 1) {
return PyUnicode_FromOrdinal(*dpos); return PyUnicode_FromOrdinal(*dpos);
} }
return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, length, prepend_sign, padding_char); return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment