gh-120726: Fix compiler warnings on is_core_module() (#120727)

Fix compiler warnings on is_core_module() and
check_interpreter_whence(): only define them when
assertions are built.
This commit is contained in:
Kirill Podoprigora 2024-06-19 10:46:04 +03:00 committed by GitHub
parent 45d5cab533
commit a816cd67f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -1551,6 +1551,7 @@ get_core_module_dict(PyInterpreterState *interp,
return NULL;
}
#ifndef NDEBUG
static inline int
is_core_module(PyInterpreterState *interp, PyObject *name, PyObject *path)
{
@ -1568,7 +1569,6 @@ is_core_module(PyInterpreterState *interp, PyObject *name, PyObject *path)
}
#ifndef NDEBUG
static _Py_ext_module_kind
_get_extension_kind(PyModuleDef *def, bool check_size)
{