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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy