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

Commit41fbcd3

Browse files
committed
gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API
1 parent5f61cde commit41fbcd3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎Include/abstract.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,12 @@ extern "C" {
147147
148148
Delete attribute named attr_name, for object o. Returns -1
149149
on failure. This is the equivalent of the Python
150-
statement: del o.attr_name. */
150+
statement: del o.attr_name.
151+
152+
Implemented as a macro in the limited C API 3.12 and older. */
153+
#if defined(Py_LIMITED_API)&&Py_LIMITED_API+0<0x030d0000
154+
# definePyObject_DelAttr(O,A) PyObject_SetAttr((O), (A), NULL)
155+
#endif
151156

152157

153158
/* Implemented elsewhere:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Implement:c:func:`PyObject_DelAttr` as a macro in the limited C API 3.12
2+
and older. Patch by Victor Stinner.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp