def generate_keyword_list(self, code):
pass
- def generate_argument_parsing_code(self, code):
+ def generate_argument_parsing_code(self, env, code):
- pass
+ i = 0
+ if self.type.optional_arg_count:
+ code.putln('if (%s) {' % Naming.optional_args_cname)
+ for arg in self.args:
+ if arg.default:
+ code.putln('if (%s->%sn > %s) {' % (Naming.optional_args_cname, Naming.pyrex_prefix, i))
+ declarator = arg.declarator
+ while not hasattr(declarator, 'name'):
+ declarator = declarator.base
+ code.putln('%s = %s->%s;' % (arg.cname, Naming.optional_args_cname, declarator.name))
+ i += 1
+ for _ in range(self.type.optional_arg_count):
+ code.putln('}')
+ code.putln('}')
def generate_argument_conversion_code(self, code):
pass