(GUILE::link_variable): Fix omission bug: Handle generated

local vars when `with_smobs'.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@429 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Thien-Thi Nguyen 2000-05-10 23:27:52 +00:00
commit 5d7040d7cb

View file

@ -657,11 +657,18 @@ GUILE::link_variable (char *name, char *iname, DataType *t)
fprintf (f_wrappers, "SCM %s(SCM s_0) {\n", var_name);
if ((t->type == T_CHAR) || (t->is_pointer)){
if (!with_smobs)
if (with_smobs) {
if (!(Status & STAT_READONLY) && t->type == T_CHAR && t->is_pointer==1) {
fprintf (f_wrappers, "\t char *_temp;\n");
fprintf (f_wrappers, "\t int _len;\n");
}
}
else {
if ((t->type == T_CHAR) || (t->is_pointer)){
fprintf (f_wrappers, "\t char _ptemp[128];\n");
fprintf (f_wrappers, "\t char *_temp;\n");
fprintf (f_wrappers, "\t int _len;\n");
fprintf (f_wrappers, "\t char *_temp;\n");
fprintf (f_wrappers, "\t int _len;\n");
}
}
fprintf (f_wrappers, "\t SCM gswig_result;\n");