We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a95c2c commit ca24e0cCopy full SHA for ca24e0c
graalpython/com.oracle.graal.python.cext/src/pystate.c
@@ -81,7 +81,14 @@ PyThreadState* PyGILState_GetThisThreadState(void) {
81
typedef PyObject* (*find_module_fun_t)(long index);
82
UPCALL_TYPED_ID(PyState_FindModule, find_module_fun_t);
83
PyObject* PyState_FindModule(struct PyModuleDef* module) {
84
- return _jls_PyState_FindModule(module->m_base.m_index);
+ Py_ssize_t index = module->m_base.m_index;
85
+ if (module->m_slots) {
86
+ return NULL;
87
+ } else if (index == 0) {
88
89
+ } else {
90
+ return _jls_PyState_FindModule(index);
91
+ }
92
}
93
94
int PyState_AddModule(PyObject* module, struct PyModuleDef* def) {
0 commit comments