FROZEN_BAD_NAME, // The given module name wasn't valid.
FROZEN_NOT_FOUND, // It wasn't in PyImport_FrozenModules.
FROZEN_DISABLED, // -X frozen_modules=off (and not essential)
- FROZEN_EXCLUDED, // The PyImport_FrozenModules entry has NULL "code".
- FROZEN_INVALID, // The PyImport_FrozenModules entry is bogus.
+ FROZEN_EXCLUDED, /* The PyImport_FrozenModules entry has NULL "code"
+ (module is present but marked as unimportable, stops search). */
+ FROZEN_INVALID, /* The PyImport_FrozenModules entry is bogus
+ (eg. does not contain executable code). */
} frozen_status;
static inline void
return FROZEN_EXCLUDED;
}
if (p->code[0] == '\0' || p->size == 0) {
+ /* Does not contain executable code. */
return FROZEN_INVALID;
}
return FROZEN_OKAY;
{
PyObject *co = PyMarshal_ReadObjectFromString(info->data, info->size);
if (co == NULL) {
+ /* Does not contain executable code. */
set_frozen_error(FROZEN_INVALID, info->nameobj);
return NULL;
}
info.nameobj = name;
}
if (info.size == 0) {
+ /* Does not contain executable code. */
set_frozen_error(FROZEN_INVALID, name);
return NULL;
}