Commit abc7cd27 authored by Tim Peters's avatar Tim Peters

Backward branches are disgusting, at least when a forward branch

is just as easy.
parent 1e6ada05
......@@ -2548,12 +2548,8 @@ date_setstate(PyDateTime_Date *self, PyObject *arg)
int len;
unsigned char *pdata;
if (!PyTuple_Check(arg) || PyTuple_GET_SIZE(arg) != 1) {
error:
PyErr_SetString(PyExc_TypeError,
"bad argument to date.__setstate__");
return NULL;
}
if (!PyTuple_Check(arg) || PyTuple_GET_SIZE(arg) != 1)
goto error;
state = PyTuple_GET_ITEM(arg, 0);
if (!PyString_Check(state))
goto error;
......@@ -2568,6 +2564,10 @@ date_setstate(PyDateTime_Date *self, PyObject *arg)
Py_INCREF(Py_None);
return Py_None;
error:
PyErr_SetString(PyExc_TypeError,
"bad argument to date.__setstate__");
return NULL;
}
static PyObject *
......
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