add typedef case

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-11 09:04:27 +00:00
commit 47c625db0a
2 changed files with 19 additions and 0 deletions

View file

@ -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"

View file

@ -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"