Scilab: fix seg fault on tests naturalvar, li_std_string

This commit is contained in:
Simon Marchetto 2013-08-09 11:45:40 +02:00
commit 2026078a49

View file

@ -318,7 +318,6 @@ public:
} else { } else {
Printf(wrapper->code, "%s\n", paramTypemap); Printf(wrapper->code, "%s\n", paramTypemap);
} }
// Delete(paramTypemap); // Make SWIG crash with 'class' example
param = Getattr(param, "tmap:in:next"); param = Getattr(param, "tmap:in:next");
} else { } else {
Swig_warning(WARN_TYPEMAP_IN_UNDEF, input_file, line_number, "Unable to use type %s as a function argument.\n", SwigType_str(paramType, 0)); Swig_warning(WARN_TYPEMAP_IN_UNDEF, input_file, line_number, "Unable to use type %s as a function argument.\n", SwigType_str(paramType, 0));
@ -361,8 +360,7 @@ public:
minOutputArguments++; minOutputArguments++;
maxOutputArguments++; maxOutputArguments++;
} }
Delete(functionReturnTypemap);
//Delete(functionReturnTypemap); // Makes SWIG crash on vararg test case.
} else { } else {
Swig_warning(WARN_TYPEMAP_OUT_UNDEF, input_file, line_number, "Unable to use return type %s in function %s.\n", SwigType_str(functionReturnType, 0), functionName); Swig_warning(WARN_TYPEMAP_OUT_UNDEF, input_file, line_number, "Unable to use return type %s in function %s.\n", SwigType_str(functionReturnType, 0), functionName);
@ -392,7 +390,6 @@ public:
if (tm && (Len(tm) != 0)) { if (tm && (Len(tm) != 0)) {
Replaceall(tm, "$source", Getattr(param, "lname")); Replaceall(tm, "$source", Getattr(param, "lname"));
Printf(wrapper->code, "%s\n", tm); Printf(wrapper->code, "%s\n", tm);
Delete(tm);
} }
param= Getattr(param, "tmap:freearg:next"); param= Getattr(param, "tmap:freearg:next");
} else { } else {