mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
Now using PyInt_FromSsize_t.
This commit is contained in:
parent
af72237abc
commit
b552c4d848
1 changed files with 1 additions and 1 deletions
|
|
@ -5306,7 +5306,7 @@ unicode_count(PyUnicodeObject *self, PyObject *args)
|
||||||
if (end < 0)
|
if (end < 0)
|
||||||
end = 0;
|
end = 0;
|
||||||
|
|
||||||
result = PyInt_FromLong((long) count(self, start, end, substring));
|
result = PyInt_FromSsize_t(count(self, start, end, substring));
|
||||||
|
|
||||||
Py_DECREF(substring);
|
Py_DECREF(substring);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue