summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-05-30 05:23:59 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-05-30 05:23:59 (GMT)
commit33f4a6a31a940da72db685ec575bee047be77e9a (patch)
tree4660caa582e2a37ee9dede0ed5c30fc168a61dee /Objects
parent638144305c6e91d2ecb74df8b2a3dff9126cc494 (diff)
downloadcpython-33f4a6a31a940da72db685ec575bee047be77e9a.zip
cpython-33f4a6a31a940da72db685ec575bee047be77e9a.tar.gz
cpython-33f4a6a31a940da72db685ec575bee047be77e9a.tar.bz2
dict_print(): So that Neal & I don't spend the rest of
our lives taking turns rewriting code that works ;-), get rid of casting illusions by declaring a new variable with the obvious type.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 410b967..d4cd925 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -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;
}