diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-10-12 15:40:01 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-10-12 15:40:01 (GMT) |
commit | fe1bcb64cd2e00dcb0d1fc77f627cb538510efa6 (patch) | |
tree | 131e85d31d90cca1e883a10a06c3bc194f6e2033 /Python/ceval.c | |
parent | f208df3618f52c11fb97046951a16706af6fc3e3 (diff) | |
download | cpython-fe1bcb64cd2e00dcb0d1fc77f627cb538510efa6.zip cpython-fe1bcb64cd2e00dcb0d1fc77f627cb538510efa6.tar.gz cpython-fe1bcb64cd2e00dcb0d1fc77f627cb538510efa6.tar.bz2 |
move more variable declarations to the top of blocks
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index c13436f..807fa7d 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1834,13 +1834,14 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) TARGET(PRINT_EXPR) { PyObject *value = POP(); PyObject *hook = PySys_GetObject("displayhook"); + PyObject *res; if (hook == NULL) { PyErr_SetString(PyExc_RuntimeError, "lost sys.displayhook"); Py_DECREF(value); goto error; } - PyObject *res = PyObject_CallFunctionObjArgs(hook, value, NULL); + res = PyObject_CallFunctionObjArgs(hook, value, NULL); Py_DECREF(value); if (res == NULL) goto error; @@ -2394,7 +2395,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) _Py_IDENTIFIER(__import__); PyObject *name = GETITEM(names, oparg); PyObject *func = _PyDict_GetItemId(f->f_builtins, &PyId___import__); - PyObject *from, *level, *args; + PyObject *from, *level, *args, *res; if (func == NULL) { PyErr_SetString(PyExc_ImportError, "__import__ not found"); @@ -2426,7 +2427,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) goto error; } READ_TIMESTAMP(intr0); - PyObject *res = PyEval_CallObject(func, args); + res = PyEval_CallObject(func, args); READ_TIMESTAMP(intr1); Py_DECREF(args); Py_DECREF(func); |