Commit 27362850 authored by Tim Peters's avatar Tim Peters

call_utc_tzinfo_method(): Got rid of the label and the gotos.

parent c4a3f413
...@@ -627,13 +627,11 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg, ...@@ -627,13 +627,11 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg,
if (u == NULL) if (u == NULL)
return -1; return -1;
if (u == Py_None) { else if (u == Py_None) {
result = 0; result = 0;
*none = 1; *none = 1;
goto Done;
} }
else if (PyInt_Check(u))
if (PyInt_Check(u))
result = PyInt_AS_LONG(u); result = PyInt_AS_LONG(u);
else if (PyLong_Check(u)) else if (PyLong_Check(u))
...@@ -655,7 +653,6 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg, ...@@ -655,7 +653,6 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg,
"whole number of minutes", "whole number of minutes",
name); name);
result = -1; result = -1;
goto Done;
} }
} }
} }
...@@ -664,10 +661,8 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg, ...@@ -664,10 +661,8 @@ call_utc_tzinfo_method(PyObject *tzinfo, char *name, PyObject *tzinfoarg,
"tzinfo.%s() must return None, integer or " "tzinfo.%s() must return None, integer or "
"timedelta, not '%s'", "timedelta, not '%s'",
name, u->ob_type->tp_name); name, u->ob_type->tp_name);
goto Done;
} }
Done:
Py_DECREF(u); Py_DECREF(u);
if (result < -1439 || result > 1439) { if (result < -1439 || result > 1439) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment