[Python-checkins] bpo-36362: Avoid unused variables when HAVE_DYNAMIC_LOADING is not defined (GH-12430)
Miss Islington (bot)
webhook-mailer at python.org
Tue Mar 19 19:37:26 EDT 2019
https://github.com/python/cpython/commit/0d765e3849f1010276bb349b557b79ed94befa0b
commit: 0d765e3849f1010276bb349b557b79ed94befa0b
branch: master
author: Stéphane Wirtel <stephane at wirtel.be>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-03-19T16:37:20-07:00
summary:
bpo-36362: Avoid unused variables when HAVE_DYNAMIC_LOADING is not defined (GH-12430)
https://bugs.python.org/issue36362
files:
M Python/import.c
diff --git a/Python/import.c b/Python/import.c
index 898321ac3b47..bf3a99414fb8 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) {
More information about the Python-checkins
mailing list