aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/abstract.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/abstract.h')
-rw-r--r--Include/abstract.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index b9199fc03a3..80f3298701d 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -138,7 +138,12 @@ extern "C" {
Delete attribute named attr_name, for object o. Returns
-1 on failure.
- This is the equivalent of the Python statement: del o.attr_name. */
+ This is the equivalent of the Python statement: del o.attr_name.
+
+ Implemented as a macro in the limited C API 3.12 and older. */
+#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 < 0x030d0000
+# define PyObject_DelAttrString(O, A) PyObject_SetAttrString((O), (A), NULL)
+#endif
/* Implemented elsewhere:
@@ -147,7 +152,12 @@ extern "C" {
Delete attribute named attr_name, for object o. Returns -1
on failure. This is the equivalent of the Python
- statement: del o.attr_name. */
+ statement: del o.attr_name.
+
+ Implemented as a macro in the limited C API 3.12 and older. */
+#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 < 0x030d0000
+# define PyObject_DelAttr(O, A) PyObject_SetAttr((O), (A), NULL)
+#endif
/* Implemented elsewhere: