Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0bac33b

Browse files
committed
Oops, forgot one: inittab.
1 parent 1a43ce8 commit 0bac33b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Python/import.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -570,17 +570,17 @@ init_builtin(name)
570570
char *name;
571571
{
572572
int i;
573-
for (i = 0; inittab[i].name != NULL; i++) {
574-
if (strcmp(name, inittab[i].name) == 0) {
575-
if (inittab[i].initfunc == NULL) {
573+
for (i = 0; _PyImport_Inittab[i].name != NULL; i++) {
574+
if (strcmp(name, _PyImport_Inittab[i].name) == 0) {
575+
if (_PyImport_Inittab[i].initfunc == NULL) {
576576
PyErr_SetString(PyExc_ImportError,
577577
"Cannot re-init internal module");
578578
return -1;
579579
}
580580
if (Py_VerboseFlag)
581581
fprintf(stderr, "import %s # builtin\n",
582582
name);
583-
(*inittab[i].initfunc)();
583+
(*_PyImport_Inittab[i].initfunc)();
584584
if (PyErr_Occurred())
585585
return -1;
586586
return 1;
@@ -880,9 +880,9 @@ imp_is_builtin(self, args)
880880
char *name;
881881
if (!PyArg_ParseTuple(args, "s", &name))
882882
return NULL;
883-
for (i = 0; inittab[i].name != NULL; i++) {
884-
if (strcmp(name, inittab[i].name) == 0) {
885-
if (inittab[i].initfunc == NULL)
883+
for (i = 0; _PyImport_Inittab[i].name != NULL; i++) {
884+
if (strcmp(name, _PyImport_Inittab[i].name) == 0) {
885+
if (_PyImport_Inittab[i].initfunc == NULL)
886886
return PyInt_FromLong(-1);
887887
else
888888
return PyInt_FromLong(1);

0 commit comments

Comments
 (0)