gh-120726: Fix compiler warnings on is_core_module() (GH-120727)
Fix compiler warnings on is_core_module() and
check_interpreter_whence(): only define them when
assertions are built.
(cherry picked from commit
a816cd67f43d9adb27ccdb6331e08c835247d1df)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
return NULL;
}
+#ifndef NDEBUG
static inline int
is_core_module(PyInterpreterState *interp, PyObject *name, PyObject *path)
{
}
-#ifndef NDEBUG
static _Py_ext_module_kind
_get_extension_kind(PyModuleDef *def, bool check_size)
{
PyMem_RawFree(interp);
}
}
-
+#ifndef NDEBUG
static inline int check_interpreter_whence(long);
-
+#endif
/* Get the interpreter state to a minimal consistent state.
Further init happens in pylifecycle.c before it can be used.
All fields not initialized here are expected to be zeroed out,
return interp->_ready;
}
-
+#ifndef NDEBUG
static inline int
check_interpreter_whence(long whence)
{
}
return 0;
}
+#endif
long
_PyInterpreterState_GetWhence(PyInterpreterState *interp)