Free malloc'ed string copies after function call.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5bda0a34fa
commit
6e6434db8b
1 changed files with 5 additions and 0 deletions
|
|
@ -43,6 +43,11 @@
|
|||
SIMPLE_MAP(double, gh_scm2double, gh_double2scm, real);
|
||||
SIMPLE_MAP(char *, GSWIG_scm2str, gh_str02scm, string);
|
||||
|
||||
/* GSWIG_scm2str makes a malloc'ed copy of the string, so get rid of it after
|
||||
the function call. */
|
||||
|
||||
%typemap (guile, freearg) char * "if ($target) scm_must_free($target);";
|
||||
|
||||
/* Void */
|
||||
|
||||
%typemap (guile, out) void "gswig_result = GH_UNSPECIFIED;";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue