Skip to content

[3.14] gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API (GH-135021) #135133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Implement :c:func:`PyObject_DelAttr` and :c:func:`PyObject_DelAttrString` as
macros in the limited C API 3.12 and older. Patch by Victor Stinner.
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy