diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-07-25 19:01:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 19:01:45 (GMT) |
commit | 698b01513550798886add5e06a1c3f9a89d7dfc6 (patch) | |
tree | b61adbb68651fd6dd6bcd8b782e5e637eccb4752 /Include/modsupport.h | |
parent | b5ae7c498438657a6ba0bf4cc216b9c2c93a06c7 (diff) | |
download | cpython-698b01513550798886add5e06a1c3f9a89d7dfc6.zip cpython-698b01513550798886add5e06a1c3f9a89d7dfc6.tar.gz cpython-698b01513550798886add5e06a1c3f9a89d7dfc6.tar.bz2 |
gh-107226: PyModule_AddObjectRef() should only be in the limited API 3.10 (GH-107227)
Diffstat (limited to 'Include/modsupport.h')
-rw-r--r-- | Include/modsupport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h index 51061c5..88577e0 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -22,10 +22,12 @@ PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...); PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list); +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030a0000 // Add an attribute with name 'name' and value 'obj' to the module 'mod. // On success, return 0. // On error, raise an exception and return -1. PyAPI_FUNC(int) PyModule_AddObjectRef(PyObject *mod, const char *name, PyObject *value); +#endif /* Py_LIMITED_API */ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000 // Similar to PyModule_AddObjectRef() but steal a reference to 'value'. |