From bc3490e5bb364a5d337d8e476918401b4109ccaa Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 27 Dec 2010 11:13:55 +0100 Subject: [PATCH] another post-#633 fix: accidentally wasn't restricted to Python references --- Cython/Compiler/ExprNodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 6a42cfed..366145cf 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2954,7 +2954,7 @@ class SimpleCallNode(CallNode): for i in range(min(max_nargs, actual_nargs)): formal_type = func_type.args[i].type arg = self.args[i].coerce_to(formal_type, env) - if not env.nogil and (arg.is_attribute or not arg.is_simple): + if arg.type.is_pyobject and not env.nogil and (arg.is_attribute or not arg.is_simple): # we do not own the argument's reference, but we must # make sure it cannot be collected before we return # from the function, so we create an owned temp -- 2.26.2