From 4523a8ab6b7a27d8c6b0f460631941e8f0df54a3 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 20 Jan 2011 17:53:16 -0800 Subject: [PATCH] Warning for inline methods with buffer arguments. --- Cython/Compiler/Nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 9ecbf1a6..b2cbcb49 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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( -- 2.26.2