summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-01 07:13:07 (GMT)
committerGitHub <noreply@github.com>2023-09-01 07:13:07 (GMT)
commit3edcf743e88b4ac4431d4b0f3a66048628cf5c70 (patch)
treece31b780be3ef206e009315d2c0d7d5f70d4fe8d /Include/cpython
parentc1e2f3b2f70b8a72ea7e1bf792addf62a94ae65d (diff)
downloadcpython-3edcf743e88b4ac4431d4b0f3a66048628cf5c70.zip
cpython-3edcf743e88b4ac4431d4b0f3a66048628cf5c70.tar.gz
cpython-3edcf743e88b4ac4431d4b0f3a66048628cf5c70.tar.bz2
gh-106320: Remove private _PyLong_Sign() (#108743)
Move the private _PyLong_Sign() and _PyLong_NumBits() functions to the internal C API (pycore_long.h). Modules/_testcapi/long.c now uses the internal C API.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/longobject.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/Include/cpython/longobject.h b/Include/cpython/longobject.h
index 32c40b0..5783417 100644
--- a/Include/cpython/longobject.h
+++ b/Include/cpython/longobject.h
@@ -4,21 +4,6 @@
PyAPI_FUNC(PyObject*) PyLong_FromUnicodeObject(PyObject *u, int base);
-/* _PyLong_Sign. Return 0 if v is 0, -1 if v < 0, +1 if v > 0.
- v must not be NULL, and must be a normalized long.
- There are no error cases.
-*/
-PyAPI_FUNC(int) _PyLong_Sign(PyObject *v);
-
-/* _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.
-*/
-PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v);
-
PyAPI_FUNC(int) PyUnstable_Long_IsCompact(const PyLongObject* op);
PyAPI_FUNC(Py_ssize_t) PyUnstable_Long_CompactValue(const PyLongObject* op);