diff --git a/Examples/test-suite/primitive_types.i b/Examples/test-suite/primitive_types.i index 7ec8547a1..1ba2b3124 100644 --- a/Examples/test-suite/primitive_types.i +++ b/Examples/test-suite/primitive_types.i @@ -558,6 +558,21 @@ macro(size_t, pfx, sizet) %} +%inline +%{ + namespace DCTypes + { + typedef const unsigned int cuint; + } + + namespace DCSystem + { + using namespace DCTypes; + unsigned int SetPos(cuint& x, cuint& y) {return x + y;} + } +%} + + %apply SWIGTYPE* { char *}; %include "carrays.i" diff --git a/Examples/test-suite/python/primitive_types_runme.py b/Examples/test-suite/python/primitive_types_runme.py index 96c0aef74..bd357b528 100644 --- a/Examples/test-suite/python/primitive_types_runme.py +++ b/Examples/test-suite/python/primitive_types_runme.py @@ -353,3 +353,7 @@ s = char_foo(1,"hello") if s !="hello": raise RuntimeError, "bad char* typemap" + +v = SetPos(1,3) +if v !=4: + raise RuntimeError, "bad int typemap"