Warning for inline methods with buffer arguments.
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 21 Jan 2011 01:53:16 +0000 (17:53 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 21 Jan 2011 01:54:59 +0000 (17:54 -0800)
Cython/Compiler/Nodes.py

index 9ecbf1a665d2dec9f649fa60dac0b0ec6962ce60..b2cbcb496deda3a0eda8d62ba9fc4cfc1c00c24b 100644 (file)
@@ -1645,6 +1645,8 @@ class CFuncDefNode(FuncDefNode):
             formal_arg.type = type_arg.type
             formal_arg.name = type_arg.name
             formal_arg.cname = type_arg.cname
+            if type_arg.type.is_buffer and 'inline' in self.modifiers:
+                warning(formal_arg.pos, "Buffer unpacking not optimized away.", 1)
         name = name_declarator.name
         cname = name_declarator.cname
         self.entry = env.declare_cfunction(