FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Suppress -Wunused-function about _import_array when compiling tkagg.cpp. · matplotlib/matplotlib@6eba6c0 · GitHub

Repository navigation

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

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/_tkagg.cpp‎

Lines changed: 3 additions & 0 deletions
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)

Back | FazBrowse Home | New Git URL