mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +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
|
|
@ -387,7 +387,6 @@ PyInt_FromString(char *s, char **pend, int base)
|
|||
return PyInt_FromLong(x);
|
||||
}
|
||||
|
||||
#ifdef Py_USING_UNICODE
|
||||
PyObject *
|
||||
PyInt_FromUnicode(Py_UNICODE *s, Py_ssize_t length, int base)
|
||||
{
|
||||
|
|
@ -405,7 +404,6 @@ PyInt_FromUnicode(Py_UNICODE *s, Py_ssize_t length, int base)
|
|||
PyMem_FREE(buffer);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Methods */
|
||||
|
||||
|
|
@ -986,12 +984,10 @@ int_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
}
|
||||
return PyInt_FromString(string, NULL, base);
|
||||
}
|
||||
#ifdef Py_USING_UNICODE
|
||||
if (PyUnicode_Check(x))
|
||||
return PyInt_FromUnicode(PyUnicode_AS_UNICODE(x),
|
||||
PyUnicode_GET_SIZE(x),
|
||||
base);
|
||||
#endif
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"int() can't convert non-string with explicit base");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue