Skip to content

Commit 5db5b81

Browse files
committed
Fix C4210 warning
1 parent dd835ff commit 5db5b81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pythoncapi_compat.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2664,6 +2664,10 @@ PyUnstable_Unicode_GET_CACHED_HASH(PyObject *op)
26642664
// to make objects immortal until 3.14 which has _Py_SetImmortal(). Since
26652665
// immortal objects are primarily needed for free-threading, this API is implemented
26662666
// for 3.14 using _Py_SetImmortal() and uses private macros on 3.13.
2667+
#if 0x030E0000 <= PY_VERSION_HEX
2668+
PyAPI_FUNC(void) _Py_SetImmortal(PyObject *op);
2669+
#endif
2670+
26672671
static inline int
26682672
PyUnstable_SetImmortal(PyObject *op)
26692673
{
@@ -2672,7 +2676,6 @@ PyUnstable_SetImmortal(PyObject *op)
26722676
return 0;
26732677
}
26742678
#if 0x030E0000 <= PY_VERSION_HEX
2675-
PyAPI_FUNC(void) _Py_SetImmortal(PyObject *op);
26762679
_Py_SetImmortal(op);
26772680
#else
26782681
// Python 3.13 doesn't export _Py_SetImmortal() function

0 commit comments

Comments
 (0)