[3.13] gh-120726: Fix compiler warnings on is_core_module() (GH-120727) (#120729)

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 a816cd67f4)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
Miss Islington (bot) 2024-06-19 12:23:28 +02:00 committed by GitHub
parent 9be94f9ce6
commit 071b66b218
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)
{