mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in a couple places
This commit is contained in:
parent
3fca463627
commit
429433b30b
6 changed files with 29 additions and 28 deletions
|
@ -97,7 +97,7 @@ PyFloat_FromString(PyObject *v, char **pend)
|
|||
}
|
||||
#ifdef Py_USING_UNICODE
|
||||
else if (PyUnicode_Check(v)) {
|
||||
if (PyUnicode_GET_SIZE(v) >= sizeof(s_buffer)) {
|
||||
if (PyUnicode_GET_SIZE(v) >= (Py_ssize_t)sizeof(s_buffer)) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"Unicode float() literal too long to convert");
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue