summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorStéphane Wirtel <stephane@wirtel.be>2019-03-19 23:37:20 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-19 23:37:20 (GMT)
commit0d765e3849f1010276bb349b557b79ed94befa0b (patch)
tree9cf7dcf5ffa16760eb01c69fe5956966ca4fcfd3 /Python
parentc70ab02df2894c34da2223fc3798c0404b41fd79 (diff)
downloadcpython-0d765e3849f1010276bb349b557b79ed94befa0b.zip
cpython-0d765e3849f1010276bb349b557b79ed94befa0b.tar.gz
cpython-0d765e3849f1010276bb349b557b79ed94befa0b.tar.bz2
bpo-36362: Avoid unused variables when HAVE_DYNAMIC_LOADING is not defined (GH-12430)
https://bugs.python.org/issue36362
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) {