swig/Examples/test-suite/apply_strings.i
2006-04-24 21:37:25 +00:00

22 lines
453 B
OpenEdge ABL

/* 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; }
%}