summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-26 04:26:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-04-26 04:26:37 (GMT)
commit1138944888d13d2600241ca0d9408e018077d691 (patch)
treeaf9c498faf5a5d43807e833d710a85c8c8eff8d7 /Python
parentaed97733df4b00d47cf1d48779fb840e029c4181 (diff)
downloadcpython-1138944888d13d2600241ca0d9408e018077d691.zip
cpython-1138944888d13d2600241ca0d9408e018077d691.tar.gz
cpython-1138944888d13d2600241ca0d9408e018077d691.tar.bz2
only incref when using borrowing functions
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index a4e5a32..b9a006b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2132,6 +2132,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
GLOBAL_NAME_ERROR_MSG, w);
break;
}
+ Py_INCREF(x);
}
else {
/* Slow-path if globals or builtins is not a dict */
@@ -2147,7 +2148,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
}
}
- Py_INCREF(x);
PUSH(x);
DISPATCH();