void initimport() { if (import_modules != NULL) fatal("duplicate initimport() call"); if ((import_modules = newdictobject()) == NULL) fatal("no mem for dictionary of modules"); }
object *newmoduleobject(char *name) { moduleobject *m = NEWOBJ(moduleobject, &Moduletype); if (m == NULL) return NULL; m->md_name = newstringobject(name); m->md_dict = newdictobject(); if (m->md_name == NULL || m->md_dict == NULL) { DECREF(m); return NULL; } return (object *)m; }
void initimport() { if ((modules = newdictobject()) == NULL) fatal("no mem for dictionary of modules"); }