summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-29 03:38:51 (GMT)
committerGitHub <noreply@github.com>2023-08-29 03:38:51 (GMT)
commitb6de2850f286455239dcf16b9682db85ae64c6a1 (patch)
treee1aa8d0a9387618f89bb013f4c164a33a64a740a /Include
parentfadc2dc7df99501a40171f39b7cd23be732860cc (diff)
downloadcpython-b6de2850f286455239dcf16b9682db85ae64c6a1.zip
cpython-b6de2850f286455239dcf16b9682db85ae64c6a1.tar.gz
cpython-b6de2850f286455239dcf16b9682db85ae64c6a1.tar.bz2
gh-106320: Remove private _PyObject_GetState() (#108606)
Move the private _PyObject_GetState() function to the internal C API (pycore_object.h).
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_object.h4
-rw-r--r--Include/object.h6
2 files changed, 4 insertions, 6 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index c600771..32ff279 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -442,6 +442,10 @@ extern int _PyObject_IsAbstract(PyObject *);
extern int _PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
extern PyObject* _PyObject_NextNotImplemented(PyObject *);
+// Pickle support.
+// Export for '_datetime' shared extension
+PyAPI_FUNC(PyObject*) _PyObject_GetState(PyObject *);
+
/* C function call trampolines to mitigate bad function pointer casts.
*
* Typical native ABIs ignore additional arguments or fill in missing
diff --git a/Include/object.h b/Include/object.h
index be9a0ce..d82eb61 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -437,12 +437,6 @@ PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *);
*/
PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
-/* Pickle support. */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(PyObject *) _PyObject_GetState(PyObject *);
-#endif
-
-
/* Helpers for printing recursive container types */
PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
PyAPI_FUNC(void) Py_ReprLeave(PyObject *);