Skip to content

Commit 2df7edd

Browse files
committed
Fix PyCode_GetCode(): declare as static inline
1 parent 46d5a61 commit 2df7edd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythoncapi_compat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ PyFloat_Unpack8(const char *p, int le)
473473

474474
// gh-92154 added PyCode_GetCode() to Python 3.11.0b1
475475
#if PY_VERSION_HEX < 0x030B00B1 && !defined(PYPY_VERSION)
476-
PyObject *PyCode_GetCode(PyCodeObject *code)
476+
PYCAPI_COMPAT_STATIC_INLINE(PyObject*)
477+
PyCode_GetCode(PyCodeObject *code)
477478
{
478479
return Py_NewRef(code->co_code);
479480
}

0 commit comments

Comments
 (0)