File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,32 @@ <H3><a name="SWIG_nn12">5.2.3 Constants</a></H3>
826
826
</ pre >
827
827
</ div >
828
828
829
+ < p >
830
+ This logic can lead to false attempts at converting < tt > #define</ tt > into < tt > %constant</ tt > though.
831
+ For example the following case does not have any undefined symbols within the macro:
832
+ </ p >
833
+
834
+ < div class ="code ">
835
+ < pre >
836
+ // For indicating pure virtual functions such as: virtual void f() PURE;
837
+ #define PURE = 0
838
+ </ pre >
839
+ </ div >
840
+
841
+ < p >
842
+ A warning is issued:
843
+ </ p >
844
+
845
+ < div class ="shell ">
846
+ < pre >
847
+ pure.h:1: Warning 305: Bad constant value (ignored).
848
+ </ pre >
849
+ </ div >
850
+
851
+ < p >
852
+ In such cases simply ignore the warning or suppress it using the normal warning suppression techniques.
853
+ </ p >
854
+
829
855
< p >
830
856
The use of constant expressions is allowed, but SWIG does not evaluate
831
857
them. Rather, it passes them through to the output file and lets the C
You can’t perform that action at this time.
0 commit comments