diff options
author | Barry Warsaw <barry@python.org> | 2000-08-18 05:05:37 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2000-08-18 05:05:37 (GMT) |
commit | 87bec35d7480bf468d1d1fc7c39b7d99f1581dd0 (patch) | |
tree | 5b2fe05a86c3658c9954abfdd9f1e2f367772146 /Python | |
parent | 38aa14afb689021b22638a6c89199eca736a3802 (diff) | |
download | cpython-87bec35d7480bf468d1d1fc7c39b7d99f1581dd0.zip cpython-87bec35d7480bf468d1d1fc7c39b7d99f1581dd0.tar.gz cpython-87bec35d7480bf468d1d1fc7c39b7d99f1581dd0.tar.bz2 |
SyntaxError__classinit__(): Slight reorg for simplicity.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/exceptions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c index 690af7e..b441f51 100644 --- a/Python/exceptions.c +++ b/Python/exceptions.c @@ -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; } |