git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12393 626c5289-ae23-0410-ae9c-e8d60b6d4f22
29 lines
509 B
OpenEdge ABL
29 lines
509 B
OpenEdge ABL
/*
|
|
A test case for testing non null terminated char pointers.
|
|
*/
|
|
|
|
%module char_binary
|
|
|
|
%apply (char *STRING, size_t LENGTH) { (const char *str, size_t len) }
|
|
|
|
%inline %{
|
|
struct Test {
|
|
size_t strlen(const char *str, size_t len) {
|
|
return len;
|
|
}
|
|
};
|
|
|
|
typedef char namet[5];
|
|
namet var_namet;
|
|
|
|
typedef char* pchar;
|
|
pchar var_pchar;
|
|
%}
|
|
|
|
// Remove string handling typemaps and treat as pointer
|
|
%typemap(freearg) SWIGTYPE * ""
|
|
%apply SWIGTYPE * { char * }
|
|
|
|
%include "carrays.i"
|
|
%array_functions(char, pchar);
|
|
|