mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-41123: Remove PyLong_FromUnicode() (GH-21204)
This commit is contained in:
parent
d9f2a13106
commit
e4f1fe6edb
7 changed files with 5 additions and 30 deletions
|
|
@ -1429,7 +1429,7 @@ PyNumber_Long(PyObject *o)
|
|||
return NULL;
|
||||
|
||||
if (PyUnicode_Check(o))
|
||||
/* The below check is done in PyLong_FromUnicode(). */
|
||||
/* The below check is done in PyLong_FromUnicodeObject(). */
|
||||
return PyLong_FromUnicodeObject(o, 10);
|
||||
|
||||
if (PyBytes_Check(o))
|
||||
|
|
|
|||
|
|
@ -2503,17 +2503,6 @@ _PyLong_FromBytes(const char *s, Py_ssize_t len, int base)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base)
|
||||
{
|
||||
PyObject *v, *unicode = PyUnicode_FromWideChar(u, length);
|
||||
if (unicode == NULL)
|
||||
return NULL;
|
||||
v = PyLong_FromUnicodeObject(unicode, base);
|
||||
Py_DECREF(unicode);
|
||||
return v;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
PyLong_FromUnicodeObject(PyObject *u, int base)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue