https://github.com/python/cpython/commit/5f91d5d9a4187c4bfa2ddd653b819b12eb3ad477
commit: 5f91d5d9a4187c4bfa2ddd653b819b12eb3ad477
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2025-10-12T19:32:10+02:00
summary:
gh-112075: Remove _PyObject_SetManagedDict() function (#139737)
Move it to the internal C API and no longer export it.
files:
M Include/cpython/object.h
M Include/internal/pycore_object.h
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index e2f87524c218b6..d64298232e705c 100644
--- a/Include/cpython/object.h
+++ b/Include/cpython/object.h
@@ -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);
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index 77560e5da66b03..980d6d7764bd2c 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -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)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]