ensure %apply with char*, unsigned char* and signed char* works

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9072 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-05-03 20:58:19 +00:00
commit 2d24918a97
8 changed files with 73 additions and 17 deletions

View file

@ -289,11 +289,11 @@ SIMPLE_MAP(unsigned long long, gh_scm2ulong_long, gh_ulong_long2scm, integer);
/* Strings */
%typemap (in, doc="$NAME is a string") char *(int must_free = 0) {
$1 = SWIG_scm2str($input);
$1 = ($1_type)SWIG_scm2str($input);
must_free = 1;
}
%typemap (varin, doc="NEW-VALUE is a string") char * {$1 = SWIG_scm2str($input);}
%typemap (out, doc="<string>") char * {$result = gh_str02scm($1);}
%typemap (out, doc="<string>") char * {$result = gh_str02scm((const char *)$1);}
%typemap (varout, doc="<string>") char * {$result = gh_str02scm($1);}
%typemap (in, doc="$NAME is a string") char * *INPUT(char * temp, int must_free = 0) {
temp = (char *) SWIG_scm2str($input); $1 = &temp;