mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Implement PEP 393.
This commit is contained in:
parent
48d49497c5
commit
d63a3b8beb
102 changed files with 8153 additions and 5431 deletions
|
|
@ -1379,9 +1379,7 @@ PyNumber_Long(PyObject *o)
|
|||
PyBytes_GET_SIZE(o));
|
||||
if (PyUnicode_Check(o))
|
||||
/* The above check is done in PyLong_FromUnicode(). */
|
||||
return PyLong_FromUnicode(PyUnicode_AS_UNICODE(o),
|
||||
PyUnicode_GET_SIZE(o),
|
||||
10);
|
||||
return PyLong_FromUnicodeObject(o, 10);
|
||||
if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
|
||||
return long_from_string(buffer, buffer_len);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue