In -scm mode, don't forget to check the type of string arguments.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5742 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2004-03-02 12:58:00 +00:00
commit 4976eb0725

View file

@ -77,6 +77,8 @@ SWIG_Guile_scm2newstr(SCM str, size_t *len) {
char *ret;
size_t l;
SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
l = SCM_STRING_LENGTH(str);
ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
if (!ret) return NULL;