Commit 87bec35d authored by Barry Warsaw's avatar Barry Warsaw

SyntaxError__classinit__(): Slight reorg for simplicity.

parent 38aa14af
......@@ -647,6 +647,7 @@ SyntaxError__doc__[] = "Invalid syntax.";
static int
SyntaxError__classinit__(PyObject *klass)
{
int retval = 0;
PyObject *emptystring = PyString_FromString("");
/* Additional class-creation time initializations */
......@@ -657,11 +658,10 @@ SyntaxError__classinit__(PyObject *klass)
PyObject_SetAttrString(klass, "offset", Py_None) ||
PyObject_SetAttrString(klass, "text", Py_None))
{
Py_XDECREF(emptystring);
return -1;
retval = -1;
}
Py_DECREF(emptystring);
return 0;
Py_XDECREF(emptystring);
return retval;
}
......
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