summaryrefslogtreecommitdiff
path: root/Cython/Utility/StringTools.c
diff options
context:
space:
mode:
authorLisandro Dalcin <dalcinl@gmail.com>2022-06-21 15:04:54 +0300
committerGitHub <noreply@github.com>2022-06-21 14:04:54 +0200
commita118960f7643cd343f3a4bb7ef653a69ef16c13b (patch)
tree6eae6124b37da7cf0f6bf4b6601184f712b403e6 /Cython/Utility/StringTools.c
parent6b6d5f20f04fb581a23effec5a14ec7a97b213fd (diff)
downloadcython-a118960f7643cd343f3a4bb7ef653a69ef16c13b.tar.gz
Fix GCC -Wconversion warnings in C utility code (GH-4854)
Diffstat (limited to 'Cython/Utility/StringTools.c')
-rw-r--r--Cython/Utility/StringTools.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
index 8c92228cb..910fbf6fa 100644
--- a/Cython/Utility/StringTools.c
+++ b/Cython/Utility/StringTools.c
@@ -1012,7 +1012,7 @@ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars,
padding = PyUnicode_FromOrdinal(padding_char);
if (likely(padding) && uoffset > prepend_sign + 1) {
PyObject *tmp;
- PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
+ PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
if (unlikely(!repeat)) goto done_or_error;
tmp = PyNumber_Multiply(padding, repeat);
Py_DECREF(repeat);