summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-12-23 16:17:39 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-12-23 16:17:39 (GMT)
commit2736285035fe38b1788e69445feb9c8e1ec5bbe4 (patch)
tree0b6acb03c5b288b8b9ef792b11c314e7cc8bfdf8 /Modules
parentc4a3f413a73edb1e9b00073bdad2103d80b1d980 (diff)
downloadcpython-2736285035fe38b1788e69445feb9c8e1ec5bbe4.zip
cpython-2736285035fe38b1788e69445feb9c8e1ec5bbe4.tar.gz
cpython-2736285035fe38b1788e69445feb9c8e1ec5bbe4.tar.bz2
call_utc_tzinfo_method(): Got rid of the label and the gotos.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/datetimemodule.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index a9675d6..250ee23 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -627,13 +627,11 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg,
if (u == NULL)
return -1;
- if (u == Py_None) {
+ else if (u == Py_None) {
result = 0;
*none = 1;
- goto Done;
}
-
- if (PyInt_Check(u))
+ else if (PyInt_Check(u))
result = PyInt_AS_LONG(u);
else if (PyLong_Check(u))
@@ -655,7 +653,6 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg,
"whole number of minutes",
name);
result = -1;
- goto Done;
}
}
}
@@ -664,10 +661,8 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg,
"tzinfo.%s() must return None, integer or "
"timedelta, not '%s'",
name, u->ob_type->tp_name);
- goto Done;
}
-Done:
Py_DECREF(u);
if (result < -1439 || result > 1439) {
PyErr_Format(PyExc_ValueError,