Commit 94c22aea authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #168 from bfroehle/unused_function_getbuffer

Fix warning: unused function '__pyx_pw_5numpy_7ndarray_1__getbuffer__'
parents 4f3278ed 372c69bd
......@@ -2976,8 +2976,15 @@ class DefNodeWrapper(FuncDefNode):
"PyObject *%s, PyObject *%s"
% (Naming.args_cname, Naming.kwds_cname))
arg_code = ", ".join(arg_code_list)
# Prevent warning: unused function '__pyx_pw_5numpy_7ndarray_1__getbuffer__'
mf = ""
if (entry.name in ("__getbuffer__", "__releasebuffer__")
and entry.scope.is_c_class_scope):
mf = "CYTHON_UNUSED "
dc = self.return_type.declaration_code(entry.func_cname)
header = "static %s(%s)" % (dc, arg_code)
header = "static %s%s(%s)" % (mf, dc, arg_code)
code.putln("%s; /*proto*/" % header)
if proto_only:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment