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:
Matthias Köppe 2000-08-31 15:27:58 +00:00
commit 6e6434db8b

View file

@ -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;";