]> granicus.if.org Git - python/commitdiff
dict_print(): So that Neal & I don't spend the rest of
authorTim Peters <tim.peters@gmail.com>
Tue, 30 May 2006 05:23:59 +0000 (05:23 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 30 May 2006 05:23:59 +0000 (05:23 +0000)
our lives taking turns rewriting code that works ;-),
get rid of casting illusions by declaring a new variable
with the obvious type.

Objects/dictobject.c

index 410b9670e4b90b3fd6da210d9b5bc80744e8b541..d4cd925b8b82b00603944e9b0d02956c166500a5 100644 (file)
@@ -763,11 +763,12 @@ dict_print(register dictobject *mp, register FILE *fp, register int flags)
 {
        register Py_ssize_t i;
        register Py_ssize_t any;
+       int status;
 
-       i = Py_ReprEnter((PyObject*)mp);
-       if (i != 0) {
-               if (i < 0)
-                       return (int)i;
+       status = Py_ReprEnter((PyObject*)mp);
+       if (status != 0) {
+               if (status < 0)
+                       return status;
                fprintf(fp, "{...}");
                return 0;
        }