mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
gh-119336: Restore removed _PyLong_NumBits() function (#119418)
It is used by the pywin32 project.
This commit is contained in:
parent
b1374aa1c2
commit
e50fac96e8
3 changed files with 10 additions and 11 deletions
|
|
@ -47,17 +47,6 @@ extern "C" {
|
|||
# error "_PY_LONG_DEFAULT_MAX_STR_DIGITS smaller than threshold."
|
||||
#endif
|
||||
|
||||
// _PyLong_NumBits. Return the number of bits needed to represent the
|
||||
// absolute value of a long. For example, this returns 1 for 1 and -1, 2
|
||||
// for 2 and -2, and 2 for 3 and -3. It returns 0 for 0.
|
||||
// v must not be NULL, and must be a normalized long.
|
||||
// (size_t)-1 is returned and OverflowError set if the true result doesn't
|
||||
// fit in a size_t.
|
||||
//
|
||||
// Export for 'math' shared extension.
|
||||
PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v);
|
||||
|
||||
|
||||
/* runtime lifecycle */
|
||||
|
||||
extern PyStatus _PyLong_InitTypes(PyInterpreterState *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue