Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API#135021

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
encukou merged 1 commit intopython:mainfromvstinner:object_delattr
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API
  • Loading branch information
@vstinner
vstinner committedJun 2, 2025
commitfd62a0ab54073afdfae97e48b2a168a3cccb1a90
14 changes: 12 additions & 2 deletionsInclude/abstract.h
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp