summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-26 00:24:27 (GMT)
committerGitHub <noreply@github.com>2023-08-26 00:24:27 (GMT)
commit713afb8804666405f29115cf459b591308e3ab54 (patch)
treedb6bdfbbf19f1b222c4d6a6e027efd6a4202e96c /Include
parent86bc9e35c4aaf3bcc045ddd998844ffb64fec3a2 (diff)
downloadcpython-713afb8804666405f29115cf459b591308e3ab54.zip
cpython-713afb8804666405f29115cf459b591308e3ab54.tar.gz
cpython-713afb8804666405f29115cf459b591308e3ab54.tar.bz2
gh-106320: Remove private _PyLong converter functions (#108499)
Move these private functions to the internal C API (pycore_long.h): * _PyLong_UnsignedInt_Converter() * _PyLong_UnsignedLongLong_Converter() * _PyLong_UnsignedLong_Converter() * _PyLong_UnsignedShort_Converter() Argument Clinic now emits #include "pycore_long.h" when these functions are used.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/longobject.h4
-rw-r--r--Include/internal/pycore_long.h7
2 files changed, 7 insertions, 4 deletions
diff --git a/Include/cpython/longobject.h b/Include/cpython/longobject.h
index 7401566..c7ae1c2 100644
--- a/Include/cpython/longobject.h
+++ b/Include/cpython/longobject.h
@@ -2,10 +2,6 @@
# error "this header file must not be included directly"
#endif
-PyAPI_FUNC(int) _PyLong_UnsignedShort_Converter(PyObject *, void *);
-PyAPI_FUNC(int) _PyLong_UnsignedInt_Converter(PyObject *, void *);
-PyAPI_FUNC(int) _PyLong_UnsignedLong_Converter(PyObject *, void *);
-PyAPI_FUNC(int) _PyLong_UnsignedLongLong_Converter(PyObject *, void *);
PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
PyAPI_FUNC(PyObject*) PyLong_FromUnicodeObject(PyObject *u, int base);
diff --git a/Include/internal/pycore_long.h b/Include/internal/pycore_long.h
index a764948..1dc5b74 100644
--- a/Include/internal/pycore_long.h
+++ b/Include/internal/pycore_long.h
@@ -186,6 +186,13 @@ extern char* _PyLong_FormatBytesWriter(
int base,
int alternate);
+// Argument converters used by Argument Clinic
+PyAPI_FUNC(int) _PyLong_UnsignedShort_Converter(PyObject *, void *);
+PyAPI_FUNC(int) _PyLong_UnsignedInt_Converter(PyObject *, void *);
+PyAPI_FUNC(int) _PyLong_UnsignedLong_Converter(PyObject *, void *);
+PyAPI_FUNC(int) _PyLong_UnsignedLongLong_Converter(PyObject *, void *);
+
+
/* Long value tag bits:
* 0-1: Sign bits value = (1-sign), ie. negative=2, positive=0, zero=1.
* 2: Reserved for immortality bit