Incorporated patch #101430, fixing bugs in the Guile module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@852 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
92ae5e5161
commit
e867ed25a8
4 changed files with 26 additions and 6 deletions
|
|
@ -44,6 +44,15 @@ GSWIG_scm2str (SCM s)
|
|||
return gh_scm2newstr (s, NULL);
|
||||
}
|
||||
|
||||
/* SCM_CHAR and SCM_CHARP were introduced in Guile 1.4; the following is for
|
||||
1.3.4 compatibility. */
|
||||
#ifndef SCM_CHAR
|
||||
# define SCM_CHAR SCM_ICHR
|
||||
#endif
|
||||
#ifndef SCM_CHARP
|
||||
# define SCM_CHARP SCM_ICHRP
|
||||
#endif
|
||||
|
||||
/* This function replaces gh_scm2char, which is broken in Guile 1.4 */
|
||||
static char
|
||||
GSWIG_scm2char (SCM s)
|
||||
|
|
|
|||
|
|
@ -42,11 +42,12 @@
|
|||
SIMPLE_MAP(float, gh_scm2double, gh_double2scm, real);
|
||||
SIMPLE_MAP(double, gh_scm2double, gh_double2scm, real);
|
||||
SIMPLE_MAP(char *, GSWIG_scm2str, gh_str02scm, string);
|
||||
SIMPLE_MAP(const 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);";
|
||||
%typemap (guile, freearg) char *, const char * "if ($target) scm_must_free($target);";
|
||||
|
||||
/* Void */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue