Skip to content

Commit eb13d63

Browse files
committed
C2PY_xx macros are empty for gcc. Avoid warnings
1 parent 42a3d04 commit eb13d63

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/c2py/user_api.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66

77
// ------------- Annotations for function ---------------
88

9+
// The attribute are only meaningfull for clang tools, hence for clang.
10+
#ifndef __GNUC__
911
#define C2PY_IGNORE __attribute__((annotate("c2py_ignore")))
1012
#define C2PY_WRAP_AS_METHOD __attribute__((annotate("c2py_wrap_as_method")))
1113
#define C2PY_MODULE_INIT __attribute__((annotate("c2py_module_init")))
1214
#define C2PY_NOGIL __attribute__((annotate("c2py_nogil")))
1315
#define C2PY_RENAME(X) __attribute__((annotate("c2py_rename:" #X)))
16+
#else
17+
#define C2PY_IGNORE
18+
#define C2PY_WRAP_AS_METHOD
19+
#define C2PY_MODULE_INIT
20+
#define C2PY_NOGIL
21+
#define C2PY_RENAME(X)
22+
#endif
1423

1524
//#define C2PY_METHODS_AS_PROPERTY __attribute__((annotate("c2py_methods_as_property")))
1625

0 commit comments

Comments
 (0)