• Home
  • Raw
  • Download

Lines Matching refs:modules_by_index

309     Py_CLEAR(interp->modules_by_index);  in interpreter_clear()
710 if (state->modules_by_index == NULL) in PyState_FindModule()
712 if (index >= PyList_GET_SIZE(state->modules_by_index)) in PyState_FindModule()
714 res = PyList_GET_ITEM(state->modules_by_index, index); in PyState_FindModule()
733 if (!interp->modules_by_index) { in _PyState_AddModule()
734 interp->modules_by_index = PyList_New(0); in _PyState_AddModule()
735 if (!interp->modules_by_index) { in _PyState_AddModule()
740 while (PyList_GET_SIZE(interp->modules_by_index) <= def->m_base.m_index) { in _PyState_AddModule()
741 if (PyList_Append(interp->modules_by_index, Py_None) < 0) { in _PyState_AddModule()
747 return PyList_SetItem(interp->modules_by_index, in _PyState_AddModule()
762 if (interp->modules_by_index && in PyState_AddModule()
763 index < PyList_GET_SIZE(interp->modules_by_index) && in PyState_AddModule()
764 module == PyList_GET_ITEM(interp->modules_by_index, index)) in PyState_AddModule()
789 if (interp->modules_by_index == NULL) { in PyState_RemoveModule()
792 if (index > PyList_GET_SIZE(interp->modules_by_index)) { in PyState_RemoveModule()
797 return PyList_SetItem(interp->modules_by_index, index, Py_None); in PyState_RemoveModule()
804 if (!interp->modules_by_index) { in _PyInterpreterState_ClearModules()
809 for (i = 0; i < PyList_GET_SIZE(interp->modules_by_index); i++) { in _PyInterpreterState_ClearModules()
810 PyObject *m = PyList_GET_ITEM(interp->modules_by_index, i); in _PyInterpreterState_ClearModules()
822 if (PyList_SetSlice(interp->modules_by_index, in _PyInterpreterState_ClearModules()
823 0, PyList_GET_SIZE(interp->modules_by_index), in _PyInterpreterState_ClearModules()
825 PyErr_WriteUnraisable(interp->modules_by_index); in _PyInterpreterState_ClearModules()