]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112075: Remove _PyObject_SetManagedDict() function (#139737)
authorVictor Stinner <vstinner@python.org>
Sun, 12 Oct 2025 17:32:10 +0000 (19:32 +0200)
committerGitHub <noreply@github.com>
Sun, 12 Oct 2025 17:32:10 +0000 (19:32 +0200)
Move it to the internal C API and no longer export it.

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

index e2f87524c218b6382ccd50b4df3e5b3bc0360190..d64298232e705c8740c49cb4dd522625cdcf5db2 100644 (file)
@@ -442,7 +442,6 @@ PyAPI_FUNC(int) _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int m
 PyAPI_FUNC(void *) PyObject_GetItemData(PyObject *obj);
 
 PyAPI_FUNC(int) PyObject_VisitManagedDict(PyObject *obj, visitproc visit, void *arg);
-PyAPI_FUNC(int) _PyObject_SetManagedDict(PyObject *obj, PyObject *new_dict);
 PyAPI_FUNC(void) PyObject_ClearManagedDict(PyObject *obj);
 
 
index 77560e5da66b03cf8bf407b93b1b0fafa160d69f..980d6d7764bd2cd35051a0dbf780486d930c4e1b 100644 (file)
@@ -1031,7 +1031,8 @@ enum _PyAnnotateFormat {
     _Py_ANNOTATE_FORMAT_STRING = 4,
 };
 
-int _PyObject_SetDict(PyObject *obj, PyObject *value);
+extern int _PyObject_SetDict(PyObject *obj, PyObject *value);
+extern int _PyObject_SetManagedDict(PyObject *obj, PyObject *new_dict);
 
 #ifndef Py_GIL_DISABLED
 static inline Py_ALWAYS_INLINE void _Py_INCREF_MORTAL(PyObject *op)