1899
|
1 /*
|
|
2 Include the internal swig macro codes. These macros correspond to
|
|
3 the one found in Source/Include/swigwarn.h plus the 'SWIG' prefix.
|
|
4
|
|
5 For example, in the include file 'swigwarn.h' you will find
|
|
6
|
|
7 #define WARN_TYPEMAP_CHARLEAK ...
|
|
8
|
|
9 and in the 'swigwarn.swg' interface, you will see
|
|
10
|
|
11 %define SWIGWARN_TYPEMAP_CHARLEAK ...
|
|
12
|
|
13 This code can be used in warning filters as follows:
|
|
14
|
|
15 %warnfilter(SWIGWARN_TYPEMAP_CHARLEAK);
|
|
16
|
|
17 Warnings messages used in typemaps. Message names will be the same
|
|
18 as those in Lib/swigwarn.swg but with the suffix _MSG.
|
|
19
|
|
20 For example, for the code SWIGWARN_TYPEMAP_CHARLEAK, once you use
|
|
21
|
|
22 %typemapmsg(CHARLEAK,<msg>);
|
|
23
|
|
24 you use the message in your typemap as
|
|
25
|
|
26 %typemap(varin,warning=SWIGWARN_TYPEMAP_CHARLEAK_MSG) char *
|
|
27
|
|
28 while you suppress the warning using
|
|
29
|
|
30 %warnfilter(SWIGWARN_TYPEMAP_CHARLEAK);
|
|
31
|
|
32 as described above.
|
|
33 */
|
|
34
|
|
35 /* -----------------------------------------------------------------------------
|
|
36 * SWIG warning codes
|
|
37 * ----------------------------------------------------------------------------- */
|
|
38
|
|
39 %include <swigwarn.swg>
|
|
40
|
|
41 /* -----------------------------------------------------------------------------
|
|
42 * Auxiliary macros
|
|
43 * ----------------------------------------------------------------------------- */
|
|
44
|
|
45 /* Macro to define warning messages */
|
|
46 #define %_warningmsg(Val, Msg...) `Val`":"Msg
|
|
47 #define %warningmsg(Val, Msg...) %_warningmsg(Val, Msg)
|
|
48
|
|
49 /* -----------------------------------------------------------------------------
|
|
50 * Typemap related warning messages
|
|
51 * ----------------------------------------------------------------------------- */
|
|
52
|
|
53 %define SWIGWARN_TYPEMAP_CHARLEAK_MSG "451:Setting a const char * variable may leak memory." %enddef
|
|
54 %define SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG "454:Setting a pointer/reference variable may leak memory." %enddef
|
|
55 %define SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG "470:Thread/reentrant unsafe wrapping, consider returning by value instead." %enddef
|
|
56 %define SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG "473:Returning a pointer or reference in a director method is not recommended." %enddef
|
|
57
|
|
58 /* -----------------------------------------------------------------------------
|
|
59 * Operator related warning messages
|
|
60 * ----------------------------------------------------------------------------- */
|
|
61
|
|
62 %define SWIGWARN_IGNORE_OPERATOR_NEW_MSG "350:operator new ignored" %enddef
|
|
63 %define SWIGWARN_IGNORE_OPERATOR_DELETE_MSG "351:operator delete ignored" %enddef
|
|
64 %define SWIGWARN_IGNORE_OPERATOR_PLUS_MSG "352:operator+ ignored" %enddef
|
|
65 %define SWIGWARN_IGNORE_OPERATOR_MINUS_MSG "353:operator- ignored" %enddef
|
|
66 %define SWIGWARN_IGNORE_OPERATOR_MUL_MSG "354:operator* ignored" %enddef
|
|
67 %define SWIGWARN_IGNORE_OPERATOR_DIV_MSG "355:operator/ ignored" %enddef
|
|
68 %define SWIGWARN_IGNORE_OPERATOR_MOD_MSG "356:operator% ignored" %enddef
|
|
69 %define SWIGWARN_IGNORE_OPERATOR_XOR_MSG "357:operator^ ignored" %enddef
|
|
70 %define SWIGWARN_IGNORE_OPERATOR_AND_MSG "358:operator& ignored" %enddef
|
|
71 %define SWIGWARN_IGNORE_OPERATOR_OR_MSG "359:operator| ignored" %enddef
|
|
72 %define SWIGWARN_IGNORE_OPERATOR_NOT_MSG "360:operator~ ignored" %enddef
|
|
73 %define SWIGWARN_IGNORE_OPERATOR_LNOT_MSG "361:operator! ignored" %enddef
|
|
74 %define SWIGWARN_IGNORE_OPERATOR_EQ_MSG "362:operator= ignored" %enddef
|
|
75 %define SWIGWARN_IGNORE_OPERATOR_LT_MSG "363:operator< ignored" %enddef
|
|
76 %define SWIGWARN_IGNORE_OPERATOR_GT_MSG "364:operator> ignored" %enddef
|
|
77 %define SWIGWARN_IGNORE_OPERATOR_PLUSEQ_MSG "365:operator+= ignored" %enddef
|
|
78 %define SWIGWARN_IGNORE_OPERATOR_MINUSEQ_MSG "366:operator-= ignored" %enddef
|
|
79 %define SWIGWARN_IGNORE_OPERATOR_MULEQ_MSG "367:operator*= ignored" %enddef
|
|
80 %define SWIGWARN_IGNORE_OPERATOR_DIVEQ_MSG "368:operator/= ignored" %enddef
|
|
81 %define SWIGWARN_IGNORE_OPERATOR_MODEQ_MSG "369:operator%= ignored" %enddef
|
|
82 %define SWIGWARN_IGNORE_OPERATOR_XOREQ_MSG "370:operator^= ignored" %enddef
|
|
83 %define SWIGWARN_IGNORE_OPERATOR_ANDEQ_MSG "371:operator&= ignored" %enddef
|
|
84 %define SWIGWARN_IGNORE_OPERATOR_OREQ_MSG "372:operator|= ignored" %enddef
|
|
85 %define SWIGWARN_IGNORE_OPERATOR_LSHIFT_MSG "373:operator<< ignored" %enddef
|
|
86 %define SWIGWARN_IGNORE_OPERATOR_RSHIFT_MSG "374:operator>> ignored" %enddef
|
|
87 %define SWIGWARN_IGNORE_OPERATOR_LSHIFTEQ_MSG "375:operator<<= ignored" %enddef
|
|
88 %define SWIGWARN_IGNORE_OPERATOR_RSHIFTEQ_MSG "376:operator>>= ignored" %enddef
|
|
89 %define SWIGWARN_IGNORE_OPERATOR_EQUALTO_MSG "377:operator== ignored" %enddef
|
|
90 %define SWIGWARN_IGNORE_OPERATOR_NOTEQUAL_MSG "378:operator!= ignored" %enddef
|
|
91 %define SWIGWARN_IGNORE_OPERATOR_LTEQUAL_MSG "379:operator<= ignored" %enddef
|
|
92 %define SWIGWARN_IGNORE_OPERATOR_GTEQUAL_MSG "380:operator>= ignored" %enddef
|
|
93 %define SWIGWARN_IGNORE_OPERATOR_LAND_MSG "381:operator&& ignored" %enddef
|
|
94 %define SWIGWARN_IGNORE_OPERATOR_LOR_MSG "382:operator|| ignored" %enddef
|
|
95 %define SWIGWARN_IGNORE_OPERATOR_PLUSPLUS_MSG "383:operator++ ignored" %enddef
|
|
96 %define SWIGWARN_IGNORE_OPERATOR_MINUSMINUS_MSG "384:operator-- ignored" %enddef
|
|
97 %define SWIGWARN_IGNORE_OPERATOR_COMMA_MSG "385:operator-- ignored" %enddef
|
|
98 %define SWIGWARN_IGNORE_OPERATOR_ARROWSTAR_MSG "386:operator->* ignored" %enddef
|
|
99 %define SWIGWARN_IGNORE_OPERATOR_ARROW_MSG "387:operator-> ignored" %enddef
|
|
100 %define SWIGWARN_IGNORE_OPERATOR_CALL_MSG "388:operator() ignored" %enddef
|
|
101 %define SWIGWARN_IGNORE_OPERATOR_INDEX_MSG "389:operator[] ignored (consider using %%extend)" %enddef
|
|
102 %define SWIGWARN_IGNORE_OPERATOR_UPLUS_MSG "390:operator+ ignored" %enddef
|
|
103 %define SWIGWARN_IGNORE_OPERATOR_UMINUS_MSG "391:operator- ignored" %enddef
|
|
104 %define SWIGWARN_IGNORE_OPERATOR_UMUL_MSG "392:operator* ignored" %enddef
|
|
105 %define SWIGWARN_IGNORE_OPERATOR_UAND_MSG "393:operator& ignored" %enddef
|
|
106 %define SWIGWARN_IGNORE_OPERATOR_NEWARR_MSG "394:operator new[] ignored" %enddef
|
|
107 %define SWIGWARN_IGNORE_OPERATOR_DELARR_MSG "395:operator delete[] ignored" %enddef
|
|
108 %define SWIGWARN_IGNORE_OPERATOR_REF_MSG "396:operator*() ignored" %enddef
|
|
109
|
|
110 #define %ignoreoperator(Oper) %ignorewarn(SWIGWARN_IGNORE_OPERATOR_##Oper##_MSG)
|
|
111
|
|
112 /* -----------------------------------------------------------------------------
|
|
113 * Macros for keyword and built-in names
|
|
114 * ----------------------------------------------------------------------------- */
|
|
115
|
|
116 #define %keywordwarn(msg...) %namewarn(%warningmsg(SWIGWARN_PARSE_KEYWORD, msg))
|
|
117 #define %builtinwarn(msg...) %namewarn(%warningmsg(SWIGWARN_PARSE_BUILTIN_NAME, msg), %$isfunction)
|
|
118
|
|
119
|
|
120 /* -----------------------------------------------------------------------------
|
|
121 * Warning filter feature
|
|
122 * ----------------------------------------------------------------------------- */
|
|
123
|
|
124 #define %_warnfilter(filter...) %feature("warnfilter",`filter`)
|
|
125 #define %warnfilter(filter...) %_warnfilter(filter)
|
|
126
|
|
127
|
|
128
|