diff options
Diffstat (limited to 'Examples/test-suite/constant_directive.i')
-rw-r--r-- | Examples/test-suite/constant_directive.i | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Examples/test-suite/constant_directive.i b/Examples/test-suite/constant_directive.i index 3e4775df1..f30123b3f 100644 --- a/Examples/test-suite/constant_directive.i +++ b/Examples/test-suite/constant_directive.i @@ -52,3 +52,13 @@ Type1 getType1Instance() { return Type1(111); } /* Regular constant */ %constant int TYPE_INT = 0; %constant enum EnumType newValue = enumValue; + +/* Test handling of %constant with an implicit type which SWIG can't handle. */ +#pragma SWIG nowarn=SWIGWARN_PARSE_UNSUPPORTED_VALUE +%ignore ignored_int_variable; +%inline %{ +int ignored_int_variable = 42; +%} +%constant unsupported_constant_value1 = &ignored_int_variable; +%constant unsupported_constant_value2 = getType1Instance; +%constant unsupported_constant_value3 = &getType1Instance; |