summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index 898321a..bf3a994 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1983,13 +1983,14 @@ _imp_extension_suffixes_impl(PyObject *module)
/*[clinic end generated code: output=0bf346e25a8f0cd3 input=ecdeeecfcb6f839e]*/
{
PyObject *list;
- const char *suffix;
- unsigned int index = 0;
list = PyList_New(0);
if (list == NULL)
return NULL;
#ifdef HAVE_DYNAMIC_LOADING
+ const char *suffix;
+ unsigned int index = 0;
+
while ((suffix = _PyImport_DynLoadFiletab[index])) {
PyObject *item = PyUnicode_FromString(suffix);
if (item == NULL) {