From 8edd637e7126abbf19b05e774b6dfe021d0ef877 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 26 Mar 2009 07:58:41 +0100 Subject: [PATCH] fix cdef opt-arg tests: do not double-mangle __pyx_n struct member --- Cython/Compiler/Nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index f9d7fb53..0d019501 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -549,7 +549,9 @@ class CFuncDeclaratorNode(CDeclaratorNode): if self.optional_arg_count: scope = StructOrUnionScope() - scope.declare_var('%sn' % Naming.pyrex_prefix, PyrexTypes.c_int_type, self.pos) + arg_count_member = '%sn' % Naming.pyrex_prefix + scope.declare_var(arg_count_member, PyrexTypes.c_int_type, self.pos, + cname = arg_count_member) for arg in func_type_args[len(func_type_args)-self.optional_arg_count:]: scope.declare_var(arg.name, arg.type, arg.pos, allow_pyobject = 1) struct_cname = env.mangle(Naming.opt_arg_prefix, self.base.name) -- 2.26.2