In -scm mode, don't forget to check the type of string arguments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5742 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
baded88f32
commit
e3635aed11
1 changed files with 2 additions and 0 deletions
|
|
@ -77,6 +77,8 @@ SWIG_Guile_scm2newstr(SCM str, size_t *len) {
|
||||||
char *ret;
|
char *ret;
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|
||||||
|
SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
|
||||||
|
|
||||||
l = SCM_STRING_LENGTH(str);
|
l = SCM_STRING_LENGTH(str);
|
||||||
ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
|
ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue