gh-102304: Fix 2 New Stable ABI Functions (gh-104762)

This commit is contained in:
Eric Snow 2023-05-30 16:40:07 -06:00 committed by GitHub
parent 70f315c2d6
commit 26e7bbf66e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 1 deletions

View file

@ -590,7 +590,7 @@ you can count such references to the type object.)
extern Py_ssize_t _Py_RefTotal;
# define _Py_INC_REFTOTAL() _Py_RefTotal++
# define _Py_DEC_REFTOTAL() _Py_RefTotal--
# elif !defined(Py_LIMITED_API) || Py_LIMITED_API+0 > 0x030D0000
# elif !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030C0000
PyAPI_FUNC(void) _Py_IncRefTotal_DO_NOT_USE_THIS(void);
PyAPI_FUNC(void) _Py_DecRefTotal_DO_NOT_USE_THIS(void);
# define _Py_INC_REFTOTAL() _Py_IncRefTotal_DO_NOT_USE_THIS()

View file

@ -918,6 +918,8 @@ if feature_macros['PY_HAVE_THREAD_NATIVE_ID']:
)
if feature_macros['Py_REF_DEBUG']:
SYMBOL_NAMES += (
'_Py_DecRefTotal_DO_NOT_USE_THIS',
'_Py_IncRefTotal_DO_NOT_USE_THIS',
'_Py_NegativeRefcount',
'_Py_RefTotal',
)

View file

@ -2406,3 +2406,12 @@
added = '3.12'
[const.Py_TPFLAGS_ITEMS_AT_END]
added = '3.12'
[function._Py_IncRefTotal_DO_NOT_USE_THIS]
added = '3.12'
ifdef = 'Py_REF_DEBUG'
abi_only = true
[function._Py_DecRefTotal_DO_NOT_USE_THIS]
added = '3.12'
ifdef = 'Py_REF_DEBUG'
abi_only = true

2
PC/python3dll.c generated
View file

@ -18,7 +18,9 @@ EXPORT_FUNC(_Py_BuildValue_SizeT)
EXPORT_FUNC(_Py_CheckRecursiveCall)
EXPORT_FUNC(_Py_Dealloc)
EXPORT_FUNC(_Py_DecRef)
EXPORT_FUNC(_Py_DecRefTotal_DO_NOT_USE_THIS)
EXPORT_FUNC(_Py_IncRef)
EXPORT_FUNC(_Py_IncRefTotal_DO_NOT_USE_THIS)
EXPORT_FUNC(_Py_NegativeRefcount)
EXPORT_FUNC(_Py_VaBuildValue_SizeT)
EXPORT_FUNC(_PyArg_Parse_SizeT)