]> granicus.if.org Git - python/commitdiff
move declaration to top of the function to appease the c89 gods
authorBenjamin Peterson <benjamin@python.org>
Mon, 5 Sep 2016 20:07:48 +0000 (13:07 -0700)
committerBenjamin Peterson <benjamin@python.org>
Mon, 5 Sep 2016 20:07:48 +0000 (13:07 -0700)
Modules/_hotshot.c

index da30f3bdc3247cfcd760e853ec4da8b7cd31a6e0..33cd38da2ffe4c5da580fb747081ba4475952e35 100644 (file)
@@ -340,6 +340,7 @@ unpack_add_info(LogReaderObject *self)
 {
     PyObject *key = NULL;
     PyObject *value = NULL;
+    PyObject *list;
     int err;
 
     err = unpack_string(self, &key);
@@ -348,7 +349,7 @@ unpack_add_info(LogReaderObject *self)
     err = unpack_string(self, &value);
     if (err)
         goto finally;
-    PyObject *list = PyDict_GetItem(self->info, key);
+    list = PyDict_GetItem(self->info, key);
     if (list == NULL) {
         list = PyList_New(0);
         if (list == NULL) {