%apply tests for char*, unsigned char*, signed char*

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9066 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-04-24 21:37:25 +00:00
commit d8e30d9067

View file

@ -0,0 +1,22 @@
/* Test %apply for char *, signed char *, unsigned char * */
%module apply_strings
%apply char * {UCharPtr};
%apply char * {SCharPtr};
%inline %{
typedef unsigned char* UCharPtr;
typedef signed char* SCharPtr;
UCharPtr UCharFunction(UCharPtr str) { return str; }
SCharPtr SCharFunction(SCharPtr str) { return str; }
%}
%apply SWIGTYPE* {CharPtr};
%inline %{
typedef char* CharPtr;
CharPtr CharFunction(CharPtr buf) { return buf; }
%}