mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
This commit is contained in:
parent
e20973926a
commit
06515833fe
31 changed files with 62 additions and 62 deletions
|
@ -1274,7 +1274,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
|
|||
* exp+4*ndigits and exp-4*ndigits are within the range of a long.
|
||||
*/
|
||||
|
||||
s = _PyUnicode_AsStringAndSize(arg, &length);
|
||||
s = PyUnicode_AsUTF8AndSize(arg, &length);
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
s_end = s + length;
|
||||
|
@ -1628,7 +1628,7 @@ float_getformat(PyTypeObject *v, PyObject* arg)
|
|||
Py_TYPE(arg)->tp_name);
|
||||
return NULL;
|
||||
}
|
||||
s = _PyUnicode_AsString(arg);
|
||||
s = PyUnicode_AsUTF8(arg);
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
if (strcmp(s, "double") == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue