summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi
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 /Modules/_testcapi
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 'Modules/_testcapi')
-rw-r--r--Modules/_testcapi/long.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_testcapi/long.c b/Modules/_testcapi/long.c
index 6b74e0a..c1d2d42 100644
--- a/Modules/_testcapi/long.c
+++ b/Modules/_testcapi/long.c
@@ -1,5 +1,10 @@
+#ifndef Py_BUILD_CORE_BUILTIN
+# define Py_BUILD_CORE_MODULE 1
+#endif
+
#include "parts.h"
#include "clinic/long.c.h"
+#include "pycore_long.h" // _PyLong_Sign()
/*[clinic input]
module _testcapi