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

Commit698b015

Browse files
gh-107226: PyModule_AddObjectRef() should only be in the limited API 3.10 (GH-107227)
1 parentb5ae7c4 commit698b015

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎Include/modsupport.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize
2222
PyAPI_FUNC(PyObject*)Py_BuildValue(constchar*, ...);
2323
PyAPI_FUNC(PyObject*)Py_VaBuildValue(constchar*,va_list);
2424

25+
#if !defined(Py_LIMITED_API)||Py_LIMITED_API+0 >=0x030a0000
2526
// Add an attribute with name 'name' and value 'obj' to the module 'mod.
2627
// On success, return 0.
2728
// On error, raise an exception and return -1.
2829
PyAPI_FUNC(int)PyModule_AddObjectRef(PyObject*mod,constchar*name,PyObject*value);
30+
#endif/* Py_LIMITED_API */
2931

3032
#if !defined(Py_LIMITED_API)||Py_LIMITED_API+0 >=0x030d0000
3133
// Similar to PyModule_AddObjectRef() but steal a reference to 'value'.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:c:func:`PyModule_AddObjectRef` is now only available in the limited API
2+
version 3.10 or later.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp