Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.c @ 6550:f406ec35bfca legacy-trunk
Get rid of another reference to _PyImport_Inittab (now a static array)
that should be PyImport_Inittab (a new pointer initialized to point to
the array).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 04 Nov 1997 17:04:34 +0000 |
| parents | b62a7a59414e |
| children | c7454ca7d3ac |
comparison
equal
deleted
inserted
replaced
| 6549:a8e3b2e9f5d2 | 6550:f406ec35bfca |
|---|---|
| 249 { | 249 { |
| 250 PyObject *list = PyList_New(0); | 250 PyObject *list = PyList_New(0); |
| 251 int i; | 251 int i; |
| 252 if (list == NULL) | 252 if (list == NULL) |
| 253 return NULL; | 253 return NULL; |
| 254 for (i = 0; _PyImport_Inittab[i].name != NULL; i++) { | 254 for (i = 0; PyImport_Inittab[i].name != NULL; i++) { |
| 255 PyObject *name = PyString_FromString( | 255 PyObject *name = PyString_FromString( |
| 256 _PyImport_Inittab[i].name); | 256 PyImport_Inittab[i].name); |
| 257 if (name == NULL) | 257 if (name == NULL) |
| 258 break; | 258 break; |
| 259 PyList_Append(list, name); | 259 PyList_Append(list, name); |
| 260 Py_DECREF(name); | 260 Py_DECREF(name); |
| 261 } | 261 } |
