Fix bug 782468

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
John Lenz 2004-05-02 21:24:39 +00:00
commit c0a2aea4cc
9 changed files with 310 additions and 806 deletions

View file

@ -54,13 +54,9 @@ extern int count(char *bytes, int len, char c);
/* Return the mutated string as a new object. Notice the if MANY construct ... they must be at column 0. */
%typemap(chicken,argout,fragment="list_output_helper",chicken_words="0") (char *str, int len) (C_word *scmstr)
%typemap(chicken,argout) (char *str, int len) (C_word *scmstr)
%{ scmstr = C_alloc (C_SIZEOF_STRING ($2));
/*if MANY*/
$result = list_output_helper (&known_space, $result, C_string (&scmstr, $2, $1));
/*else*/
$result = C_string (&scmstr, $2, $1);
/*endif*/
SWIG_APPEND_VALUE(C_string (&scmstr, $2, $1));
free ($1);
%}

View file

@ -1616,15 +1616,11 @@ zlib:inflate-init
$1 = (char *) malloc (*$2);
%}
/* Return the mutated string as a new object. Notice the if MANY construct ... they must be at column 0. */
%typemap(chicken,argout,fragment="list_output_helper",chicken_words="0") (Bytef *dest, uLongf *destLen)
/* Return the mutated string as a new object. */
%typemap(chicken,argout) (Bytef *dest, uLongf *destLen)
(C_word *scmstr)
%{ scmstr = C_alloc (C_SIZEOF_STRING (*$2));
/*if MANY*/
$result = list_output_helper (&known_space, $result, C_string (&scmstr, *$2, $1));
/*else*/
$result = C_string (&scmstr, *$2, $1);
/*endif*/
SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1));
free ($1);
%}
</font>
@ -1637,14 +1633,10 @@ zlib:inflate-init
"$1 = &amp;len;";
/* Return a sized string as a new object. */
%typemap(chicken,argout,fragment="list_output_helper",chicken_words="0")
%typemap(chicken,argout)
(void *outstr, uLongf *destLen) (C_word *scmstr)
%{ scmstr = C_alloc (C_SIZEOF_STRING (*$2));
/*if MANY*/
$result = list_output_helper (&amp;known_space, $result, C_string (&amp;scmstr, *$2, $1));
/*else*/
$result = C_string (&amp;scmstr, *$2, $1);
/*endif*/
SWIG_APPEND_VALUE(C_string (&amp;scmstr, *$2, $1));
%}
</font>
%inline %{

View file

@ -33,15 +33,11 @@
$1 = (char *) malloc (*$2);
%}
/* Return the mutated string as a new object. Notice the if MANY construct ... they must be at column 0. */
%typemap(chicken,argout,fragment="list_output_helper",chicken_words="0") (Bytef *dest, uLongf *destLen)
/* Return the mutated string as a new object. */
%typemap(chicken,argout) (Bytef *dest, uLongf *destLen)
(C_word *scmstr)
%{ scmstr = C_alloc (C_SIZEOF_STRING (*$2));
/*if MANY*/
$result = list_output_helper (&known_space, $result, C_string (&scmstr, *$2, $1));
/*else*/
$result = C_string (&scmstr, *$2, $1);
/*endif*/
SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1));
free ($1);
%}
@ -54,14 +50,10 @@
"$1 = &len;";
/* Return a sized string as a new object. */
%typemap(chicken,argout,fragment="list_output_helper",chicken_words="0")
%typemap(chicken,argout)
(void *outstr, uLongf *destLen) (C_word *scmstr)
%{ scmstr = C_alloc (C_SIZEOF_STRING (*$2));
/*if MANY*/
$result = list_output_helper (&known_space, $result, C_string (&scmstr, *$2, $1));
/*else*/
$result = C_string (&scmstr, *$2, $1);
/*endif*/
SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1));
%}
%inline %{