diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-10-10 18:10:33 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-10-10 18:10:33 (GMT) |
commit | 00f86f2202ca7dc78604b387ae61e269b90f0079 (patch) | |
tree | e68f27d24c3f684a2313cc48bbc6bf7c4c13b761 /Python/ceval.c | |
parent | fc2f64135861c7645ea21e3499e4d723bcd5d498 (diff) | |
download | cpython-00f86f2202ca7dc78604b387ae61e269b90f0079.zip cpython-00f86f2202ca7dc78604b387ae61e269b90f0079.tar.gz cpython-00f86f2202ca7dc78604b387ae61e269b90f0079.tar.bz2 |
add some missing DISPATCH()
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 82bfcc6..e83339b 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1955,7 +1955,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) } } PUSH(x); - break; + DISPATCH(); } TARGET(STORE_NAME) @@ -1977,11 +1977,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) TARGET(DELETE_NAME) w = GETITEM(names, oparg); if ((x = f->f_locals) != NULL) { - if ((err = PyObject_DelItem(x, w)) != 0) + if ((err = PyObject_DelItem(x, w)) != 0) { format_exc_check_arg(PyExc_NameError, NAME_ERROR_MSG, w); - break; + break; + } + DISPATCH(); } PyErr_Format(PyExc_SystemError, "no locals when deleting %R", w); @@ -1999,8 +2001,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) Py_INCREF(w); PUSH(w); } - Py_DECREF(v); - DISPATCH(); } else if (PyList_CheckExact(v) && PyList_GET_SIZE(v) == oparg) { PyObject **items = \ @@ -2016,9 +2016,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) } else { /* unpack_iterable() raised an exception */ why = WHY_EXCEPTION; + Py_DECREF(v); + break; } Py_DECREF(v); - break; + DISPATCH(); TARGET(UNPACK_EX) { @@ -2029,10 +2031,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) stack_pointer + totalargs)) { stack_pointer += totalargs; } else { + Py_DECREF(v); why = WHY_EXCEPTION; + break; } Py_DECREF(v); - break; + DISPATCH(); } TARGET(STORE_ATTR) @@ -2052,6 +2056,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) err = PyObject_SetAttr(v, w, (PyObject *)NULL); /* del v.w */ Py_DECREF(v); + if (err == 0) DISPATCH(); break; TARGET(STORE_GLOBAL) @@ -2064,10 +2069,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) TARGET(DELETE_GLOBAL) w = GETITEM(names, oparg); - if ((err = PyDict_DelItem(f->f_globals, w)) != 0) + if ((err = PyDict_DelItem(f->f_globals, w)) != 0) { format_exc_check_arg( PyExc_NameError, GLOBAL_NAME_ERROR_MSG, w); - break; + break; + } + DISPATCH(); TARGET(LOAD_NAME) w = GETITEM(names, oparg); |