Skip to content

Commit fc73e70

Browse files
committed
Fix Python 3.16 support
1 parent aed66d9 commit fc73e70

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎pythoncapi_compat.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3154,9 +3154,10 @@ PyEval_GetFrameBuiltins(void)
31543154
#endif
31553155

31563156

3157-
// Python 3.16 adds PyDict_AsFrozenDictAndClear()
3157+
// Python 3.16.0a2 adds PyDict_AsFrozenDictAndClear()
31583158
#if (_Py_PACK_VERSION(3, 15) <= PY_VERSION_HEX \
3159-
&& PY_VERSION_HEX < _Py_PACK_VERSION(3, 16))
3159+
&& (PY_VERSION_HEX < _Py_PACK_FULL_VERSION(3, 16, 0, 0xA, 2) \
3160+
|| defined(Py_LIMITED_API)))
31603161
static inline PyObject *
31613162
PyDict_AsFrozenDictAndClear(PyObject *dict)
31623163
{

0 commit comments

Comments
 (0)