Commit 8edd637e authored by Stefan Behnel's avatar Stefan Behnel

fix cdef opt-arg tests: do not double-mangle __pyx_n struct member

parent 35b604db
...@@ -549,7 +549,9 @@ class CFuncDeclaratorNode(CDeclaratorNode): ...@@ -549,7 +549,9 @@ class CFuncDeclaratorNode(CDeclaratorNode):
if self.optional_arg_count: if self.optional_arg_count:
scope = StructOrUnionScope() 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:]: 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) scope.declare_var(arg.name, arg.type, arg.pos, allow_pyobject = 1)
struct_cname = env.mangle(Naming.opt_arg_prefix, self.base.name) struct_cname = env.mangle(Naming.opt_arg_prefix, self.base.name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment