Get rid of unused argument warning, noticed by Ondrej Certik, fix by Carl Witty
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 2 Aug 2008 22:04:53 +0000 (15:04 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 2 Aug 2008 22:04:53 +0000 (15:04 -0700)
Cython/Compiler/Nodes.py

index 9911ae4bf67e0675d48cef0202059f3c87f5bfc8..1f857e845125cde409ab506cfbefcc3dafd69511 100644 (file)
@@ -1543,6 +1543,10 @@ class DefNode(FuncDefNode):
     def generate_argument_parsing_code(self, env, code):
         # Generate PyArg_ParseTuple call for generic
         # arguments, if any.
+        if self.entry.signature.has_dummy_arg:
+            # get rid of unused argument warning
+            code.putln("%s = %s;" % (Naming.self_cname, Naming.self_cname))
+
         old_error_label = code.new_error_label()
         our_error_label = code.error_label
         end_label = code.new_label()