(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:
parent
4711cdada1
commit
5d7040d7cb
1 changed files with 11 additions and 4 deletions
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue