From 1a574df52ceab462e73134d870ab95757ebbe544 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 29 Jan 2011 09:50:02 +0100 Subject: [PATCH] varargs tempification needs to be done for all varargs, not only Python objects --- Cython/Compiler/ExprNodes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index bc42fe61..6824d946 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2990,7 +2990,7 @@ class SimpleCallNode(CallNode): arg = arg.coerce_to_temp(env) self.args[i] = arg # handle additional varargs parameters - for i in range(max_nargs, actual_nargs): + for i in xrange(max_nargs, actual_nargs): arg = self.args[i] if arg.type.is_pyobject: arg_ctype = arg.type.default_coerced_ctype() @@ -2999,8 +2999,8 @@ class SimpleCallNode(CallNode): "Python object cannot be passed as a varargs parameter") else: self.args[i] = arg = arg.coerce_to(arg_ctype, env) - if arg.is_temp and i > 0: - some_args_in_temps = True + if arg.is_temp and i > 0: + some_args_in_temps = True if some_args_in_temps: # if some args are temps and others are not, they may get # constructed in the wrong order (temps first) => make -- 2.26.2