• Home
  • Raw
  • Download

Lines Matching refs:modules_by_index

135     interp->modules_by_index = NULL;  in PyInterpreterState_New()
207 Py_CLEAR(interp->modules_by_index); in PyInterpreterState_Clear()
456 if (state->modules_by_index == NULL) in PyState_FindModule()
458 if (index >= PyList_GET_SIZE(state->modules_by_index)) in PyState_FindModule()
460 res = PyList_GET_ITEM(state->modules_by_index, index); in PyState_FindModule()
478 if (!state->modules_by_index) { in _PyState_AddModule()
479 state->modules_by_index = PyList_New(0); in _PyState_AddModule()
480 if (!state->modules_by_index) in _PyState_AddModule()
483 while(PyList_GET_SIZE(state->modules_by_index) <= def->m_base.m_index) in _PyState_AddModule()
484 if (PyList_Append(state->modules_by_index, Py_None) < 0) in _PyState_AddModule()
487 return PyList_SetItem(state->modules_by_index, in _PyState_AddModule()
501 if (state->modules_by_index) { in PyState_AddModule()
502 if(PyList_GET_SIZE(state->modules_by_index) >= index) { in PyState_AddModule()
503 if(module == PyList_GET_ITEM(state->modules_by_index, index)) { in PyState_AddModule()
527 if (state->modules_by_index == NULL) { in PyState_RemoveModule()
531 if (index > PyList_GET_SIZE(state->modules_by_index)) { in PyState_RemoveModule()
536 return PyList_SetItem(state->modules_by_index, index, Py_None); in PyState_RemoveModule()
544 if (state->modules_by_index) { in _PyState_ClearModules()
546 for (i = 0; i < PyList_GET_SIZE(state->modules_by_index); i++) { in _PyState_ClearModules()
547 PyObject *m = PyList_GET_ITEM(state->modules_by_index, i); in _PyState_ClearModules()
557 if (PyList_SetSlice(state->modules_by_index, in _PyState_ClearModules()
558 0, PyList_GET_SIZE(state->modules_by_index), in _PyState_ClearModules()
560 PyErr_WriteUnraisable(state->modules_by_index); in _PyState_ClearModules()