]> granicus.if.org Git - python/commitdiff
Issue #19515: Remove duplicated identifiers in zipimport.c
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 12 Nov 2013 20:44:18 +0000 (21:44 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 12 Nov 2013 20:44:18 +0000 (21:44 +0100)
Modules/zipimport.c

index dceca5e7cd4e3b286ba2db42cdb65573421129d2..8fe919539fdfffd7b1e13be5002c443cfdac4f8e 100644 (file)
@@ -14,6 +14,10 @@ struct st_zip_searchorder {
     int type;
 };
 
+#ifdef ALTSEP
+_Py_IDENTIFIER(replace);
+#endif
+
 /* zip_searchorder defines how we search for a module in the Zip
    archive: we first search for a package __init__, then for
    non-package .pyc, .pyo and .py entries. The .pyc and .pyo entries
@@ -66,9 +70,6 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
     PyObject *path, *files, *tmp;
     PyObject *filename = NULL;
     Py_ssize_t len, flen;
-#ifdef ALTSEP
-    _Py_IDENTIFIER(replace);
-#endif
 
     if (!_PyArg_NoKeywords("zipimporter()", kwds))
         return -1;
@@ -559,9 +560,6 @@ zipimporter_get_data(PyObject *obj, PyObject *args)
 {
     ZipImporter *self = (ZipImporter *)obj;
     PyObject *path, *key;
-#ifdef ALTSEP
-    _Py_IDENTIFIER(replace);
-#endif
     PyObject *toc_entry;
     Py_ssize_t path_start, path_len, len;