diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c
index 8bf73f736cf10a20e1e9895ae8adc965a8f579df_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw==..290c22b18beba9741f6e47b56930a35a6943dec5_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw== 100644
--- a/simplejson/_speedups.c
+++ b/simplejson/_speedups.c
@@ -698,7 +698,6 @@
             // item can be added as-is
         }
         else {
-            PyObject *tpl;
             kstr = encoder_stringify_key(s, key);
             if (kstr == NULL)
                 goto bail;
@@ -710,7 +709,7 @@
             value = PyTuple_GET_ITEM(item, 1);
             if (value == NULL)
                 goto bail;
-            tpl = PyTuple_Pack(2, kstr, value);
+            PyObject *tpl = PyTuple_Pack(2, kstr, value);
             if (tpl == NULL)
                 goto bail;
             Py_CLEAR(kstr);
@@ -868,7 +867,6 @@
     char *buf = PyString_AS_STRING(pystr);
     PyObject *chunks = NULL;
     PyObject *chunk = NULL;
-    PyObject *strchunk = NULL;
 
     if (len == end) {
         raise_errmsg("Unterminated string starting at", pystr, begin);
@@ -912,7 +910,7 @@
                 goto bail;
             }
 #else /* PY_MAJOR_VERSION >= 3 */
-            strchunk = PyString_FromStringAndSize(&buf[end], next - end);
+            PyObject *strchunk = PyString_FromStringAndSize(&buf[end], next - end);
             if (strchunk == NULL) {
                 goto bail;
             }
@@ -2747,6 +2745,5 @@
                 rv = _steal_accumulate(rval, encoded);
         }
         else if (s->namedtuple_as_object && _is_namedtuple(obj)) {
-            PyObject *newobj;
             if (Py_EnterRecursiveCall(" while encoding a JSON object"))
                 return rv;
@@ -2751,6 +2748,6 @@
             if (Py_EnterRecursiveCall(" while encoding a JSON object"))
                 return rv;
-            newobj = PyObject_CallMethod(obj, "_asdict", NULL);
+            PyObject *newobj = PyObject_CallMethod(obj, "_asdict", NULL);
             if (newobj != NULL) {
                 rv = encoder_listencode_dict(s, rval, newobj, indent_level);
                 Py_DECREF(newobj);