Skip to content

Commit 6eba6c0

Browse files
committed
Suppress -Wunused-function about _import_array when compiling tkagg.cpp.
Per https://numpy.org/doc/1.17/reference/c-api.array.html#c.NO_IMPORT_ARRAY Other extension modules in Matplotlib already use the same mechanism.
1 parent c1e0211 commit 6eba6c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/_tkagg.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
#define dlsym GetProcAddress
3434
#else
3535
#include <dlfcn.h>
36+
// Suppress -Wunused-function on POSIX, but not on Windows where that would
37+
// lead to PY_ARRAY_UNIQUE_SYMBOL being an unresolved external.
38+
#define NO_IMPORT_ARRAY
3639
#endif
3740

3841
// Include our own excerpts from the Tcl / Tk headers

0 commit comments

Comments
 (0)