summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-04-29 19:49:01 (GMT)
committerGitHub <noreply@github.com>2024-04-29 19:49:01 (GMT)
commit79688b5b0ea761183193ffb0859415f3b02fa44d (patch)
treee194d6bfee8402b768741968b3753f526493e02f /Include
parentee3413c1c70725e133b29bb1d245f569a8f64062 (diff)
downloadcpython-79688b5b0ea761183193ffb0859415f3b02fa44d.zip
cpython-79688b5b0ea761183193ffb0859415f3b02fa44d.tar.gz
cpython-79688b5b0ea761183193ffb0859415f3b02fa44d.tar.bz2
gh-118331: Handle errors in _PyObject_SetManagedDict (#118334)
When detaching a dict, the `copy_values` call may fail due to out-of-memory errors. This can be triggered by test_no_memory in test_repl.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index a8f5782..a6b93b9 100644
--- a/Include/cpython/object.h
+++ b/Include/cpython/object.h
@@ -493,7 +493,7 @@ do { \
PyAPI_FUNC(void *) PyObject_GetItemData(PyObject *obj);
PyAPI_FUNC(int) PyObject_VisitManagedDict(PyObject *obj, visitproc visit, void *arg);
-PyAPI_FUNC(void) _PyObject_SetManagedDict(PyObject *obj, PyObject *new_dict);
+PyAPI_FUNC(int) _PyObject_SetManagedDict(PyObject *obj, PyObject *new_dict);
PyAPI_FUNC(void) PyObject_ClearManagedDict(PyObject *obj);
#define TYPE_MAX_WATCHERS 8