mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead
This commit is contained in:
parent
ed2682be2f
commit
c4f281eba3
6 changed files with 10 additions and 12 deletions
|
|
@ -837,7 +837,7 @@ _parse_constant(PyScannerObject *s, char *constant, Py_ssize_t idx, Py_ssize_t *
|
|||
|
||||
/* rval = parse_constant(constant) */
|
||||
rval = PyObject_CallFunctionObjArgs(s->parse_constant, cstr, NULL);
|
||||
idx += PyUnicode_GET_SIZE(cstr);
|
||||
idx += PyUnicode_GET_LENGTH(cstr);
|
||||
Py_DECREF(cstr);
|
||||
*next_idx_ptr = idx;
|
||||
return rval;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue