fix char[] varout
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5995 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d499d9b81e
commit
7c2c1a766c
1 changed files with 2 additions and 22 deletions
|
|
@ -136,18 +136,8 @@
|
|||
* Unknown size const Character array Char[ANY] handling
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
%typemap(in) Char [] = Char *;
|
||||
%typemap(in) const Char [] = Char *;
|
||||
%typemap(out) Char [] = Char *;
|
||||
%typemap(out) const Char [] = const Char *;
|
||||
%typemap(varout) Char [] = Char *;
|
||||
%typemap(varout) const Char [] = const Char *;
|
||||
%typemap(constcode) Char [] = Char *;
|
||||
%typemap(directorin) Char [] = Char *;
|
||||
%typemap(directorin) const Char [] = Char *;
|
||||
%typemap(directorout) Char [] = Char *;
|
||||
%typemap(typecheck) Char [] = Char *;
|
||||
%typemap(typecheck) const Char [] = Char *;
|
||||
%apply Char* { Char [] };
|
||||
%apply const Char* { const Char [] };
|
||||
|
||||
%typemap(varin,fragment=#SWIG_AsCharArray) Char []
|
||||
{
|
||||
|
|
@ -159,16 +149,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(varout,fragment=#SWIG_FromCharArray) const Char []
|
||||
{
|
||||
size_t size = sizeof($1);
|
||||
#ifndef SWIG_PRESERVE_CARRAY_SIZE
|
||||
while (size && ($1[size - 1] == '\0')) --size;
|
||||
#endif
|
||||
$result = SWIG_FromCharArray($1, size);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* Fix size Character array Char[ANY] handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue