From f4aa0d535d30bc0af642d173ba226640b4c3120f Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Mon, 5 Oct 2009 16:49:59 -0700 Subject: [PATCH] Forgot to run tests after last patch. (Oops.) --- Cython/Compiler/Nodes.py | 1 + tests/run/closures_T82.pyx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 5b4c8b5d..183a6faf 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -1193,6 +1193,7 @@ class FuncDefNode(StatNode, BlockNode): src = lenv.control_flow.get_state((entry.name, 'source')) if entry.in_closure and src == 'arg': code.put_var_incref(entry) + code.put_var_giveref(entry) elif not entry.in_closure and src != 'arg': code.put_var_decref(entry) diff --git a/tests/run/closures_T82.pyx b/tests/run/closures_T82.pyx index 12fc5108..37f39532 100644 --- a/tests/run/closures_T82.pyx +++ b/tests/run/closures_T82.pyx @@ -5,7 +5,7 @@ __doc__ = u""" >>> f = add_n(1000000) >>> f(1000000), f(-1000000) -2000000, 0 +(2000000, 0) >>> a(5)() 8 -- 2.26.2