]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106320: Remove private _PyObject_GetState() (#108606)
authorVictor Stinner <vstinner@python.org>
Tue, 29 Aug 2023 03:38:51 +0000 (05:38 +0200)
committerGitHub <noreply@github.com>
Tue, 29 Aug 2023 03:38:51 +0000 (03:38 +0000)
Move the private _PyObject_GetState() function to the internal C API
(pycore_object.h).

Include/internal/pycore_object.h
Include/object.h

index c6007718bae5a45a6e5ad29f8edeb0cfabbfa983..32ff2794e3623141e00e4840ad4be8d41a5a2c4e 100644 (file)
@@ -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
index be9a0cedb7205d718cba9750e7f3daf44c7c2c2f..d82eb6138743b9895b85c20fb2c4eec8cec2cdb3 100644 (file)
@@ -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 *);