Commit f410fcaf authored by Bradley M. Froehle's avatar Bradley M. Froehle

Prevent warning: unused function '__pyx_pw_5numpy_7ndarray_1__getbuffer__'

Originally fixed in 6cc61605, but a regression was later introduced in
519a19a9.

--HG--
extra : transplant_source : e%B0%AA%A0O%D0%06%1F%90%17%9C%0B%B3KN%84%17%E5%19%81
parent 8541d7be
...@@ -2942,8 +2942,15 @@ class DefNodeWrapper(FuncDefNode): ...@@ -2942,8 +2942,15 @@ class DefNodeWrapper(FuncDefNode):
"PyObject *%s, PyObject *%s" "PyObject *%s, PyObject *%s"
% (Naming.args_cname, Naming.kwds_cname)) % (Naming.args_cname, Naming.kwds_cname))
arg_code = ", ".join(arg_code_list) 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) 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) code.putln("%s; /*proto*/" % header)
if proto_only: 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