Drop _PyLong_FitsInLong. Fixes #1666.

This commit is contained in:
Martin v. Löwis 2007-12-20 22:57:23 +00:00
parent 704b34d9e4
commit 8445104d7d
3 changed files with 36 additions and 35 deletions

View file

@ -392,19 +392,6 @@ PyLong_AsLong(PyObject *obj)
return result;
}
int
_PyLong_FitsInLong(PyObject *vv)
{
int size;
if (!PyLong_CheckExact(vv)) {
PyErr_BadInternalCall();
return 0;
}
/* conservative estimate */
size = Py_SIZE(vv);
return -2 <= size && size <= 2;
}
/* Get a Py_ssize_t from a long int object.
Returns -1 and sets an error condition if overflow occurs. */