summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index c59f31c..202c868 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1666,17 +1666,14 @@ eval_frame(PyFrameObject *f)
case LOAD_FAST:
x = GETLOCAL(oparg);
- if (x == NULL) {
- format_exc_check_arg(
- PyExc_UnboundLocalError,
- UNBOUNDLOCAL_ERROR_MSG,
- PyTuple_GetItem(co->co_varnames, oparg)
- );
- break;
+ if (x != NULL) {
+ Py_INCREF(x);
+ PUSH(x);
+ continue;
}
- Py_INCREF(x);
- PUSH(x);
- if (x != NULL) continue;
+ format_exc_check_arg(PyExc_UnboundLocalError,
+ UNBOUNDLOCAL_ERROR_MSG,
+ PyTuple_GetItem(co->co_varnames, oparg));
break;
case STORE_FAST: