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:
parent
988db075cb
commit
47c625db0a
2 changed files with 19 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue