Fix error message in %typemap(in) SWIGTYPE*.

Change handling of char[ANY] out.  Now return null padding.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7469 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Kevin Ruland 2005-09-20 14:50:16 +00:00
commit 92c5d2a22b

View file

@ -86,7 +86,7 @@
{ {
/* typemap(in) SWIGTYPE * */ /* typemap(in) SWIGTYPE * */
if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor, 0) < 0) { if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor, 0) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor"); SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $1_descriptor");
} }
} }
%typemap(in) SWIGTYPE *DISOWN %typemap(in) SWIGTYPE *DISOWN
@ -218,8 +218,7 @@
%typemap(out) char [ANY] %typemap(out) char [ANY]
{ {
size_t len = strnlen($1,$1_dim0); RETVAL_STRINGL($1,$1_dim0,1);
RETVAL_STRINGL($1,len,1);
} }
// This typecheck would do hard checking for proper argument type. // This typecheck would do hard checking for proper argument type.