mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Get rid of all #ifdef Py_USING_UNICODE (it is always present now).
(With the help of unifdef from freshmeat.)
This commit is contained in:
parent
938ef57e26
commit
8d30cc0144
36 changed files with 10 additions and 472 deletions
|
@ -931,13 +931,11 @@ PyNumber_Long(PyObject *o)
|
|||
*/
|
||||
return long_from_string(PyString_AS_STRING(o),
|
||||
PyString_GET_SIZE(o));
|
||||
#ifdef Py_USING_UNICODE
|
||||
if (PyUnicode_Check(o))
|
||||
/* The above check is done in PyLong_FromUnicode(). */
|
||||
return PyLong_FromUnicode(PyUnicode_AS_UNICODE(o),
|
||||
PyUnicode_GET_SIZE(o),
|
||||
10);
|
||||
#endif
|
||||
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