use argument name directly instead of indirect pointer
authorStefan Behnel <scoder@users.berlios.de>
Sat, 1 Nov 2008 15:15:31 +0000 (16:15 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 1 Nov 2008 15:15:31 +0000 (16:15 +0100)
Cython/Compiler/Nodes.py

index 9e63d59dc736c2f8053a5b54de814b3c9046c294..ae348b56cc15a2823dd41014d5a81d898c6491e9 100644 (file)
@@ -1946,9 +1946,9 @@ class DefNode(FuncDefNode):
             for i, arg in enumerate(kw_only_args):
                 if not arg.default:
                     # required keyword-only argument missing
-                    code.put('__Pyx_RaiseKeywordRequired("%s", *%s[%d]); ' % (
-                            self.name.utf8encode(), Naming.pykwdlist_cname,
-                            len(positional_args) + i))
+                    code.put('__Pyx_RaiseKeywordRequired("%s", %s); ' % (
+                            self.name.utf8encode(),
+                            arg.name_entry.pystring_cname))
                     code.putln(code.error_goto(self.pos))
                     break