From f603ac10dbd12479a958c448a7a3cefc58174628 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 14 Oct 2010 16:26:41 +0000 Subject: [PATCH] Do not build 64 bits wrapping if Scilab is not able to manage it (will be the case with Scilab 6) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12279 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/scilab.cxx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Source/Modules/scilab.cxx b/Source/Modules/scilab.cxx index 8f28e4d07..3cdbfd9f5 100644 --- a/Source/Modules/scilab.cxx +++ b/Source/Modules/scilab.cxx @@ -242,10 +242,11 @@ public: String *getargs = NewString(""); /* The paremeter is variable */ - if (j >= num_required) + if (j >= num_required) { Printf(getargs, "if (Rhs > %d) {\n%s\n}", j, tm); - else + } else { Printv(getargs, tm, NIL); + } Printv(f->code, getargs, "\n", NIL); if ( Equal(SwigType_base(pt), "long long") || Equal(SwigType_base(pt), "unsigned long long")) { Printv(f->code, "#endif\n", NIL); @@ -278,8 +279,9 @@ public: Printf(f->code, "iOutNum ++;\niVarOut ++;\n"); } Printf(f->code, "%s\n", tm); - if (strlen(Char(tm)) != 0) + if (strlen(Char(tm)) != 0) { out_required ++; + } } else { Swig_warning(WARN_TYPEMAP_OUT_UNDEF, input_file, line_number, "Unable to use return type %s in function %s.\n", SwigType_str(d, 0), iname); @@ -334,8 +336,7 @@ public: if (out_required == 0) { out_required = 1; flag = 0; - } - else { + } else { flag = 1; } @@ -504,13 +505,16 @@ public: } Append(setf->code, "}\n"); if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long")) { - Printv(setf->def, "#endif\n", NIL); + Printv(setf->code, "#endif\n", NIL); } Wrapper_print(setf, f_wrappers); if (++ function_count % 10 == 0) { Printf(f_builder_code, "];\n\ntable = [table;"); } - Printf(f_builder_code, "\"%s\",\"%s\";", setname, setname); + + if (!( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))) { + Printf(f_builder_code, "\"%s\",\"%s\";", setname, setname); + } /* Deal with the get function */ Setattr(n, "wrap:name", getname); @@ -550,14 +554,16 @@ public: Printf(getf->code, "LhsVar(iOutNum) = iVarOut;\n"); Append(getf->code, "}\n"); if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long")) { - Printv(getf->def, " #endif\n", NIL); + Printv(getf->code, " #endif\n", NIL); } Wrapper_print(getf, f_wrappers); Printf(f_header,"%s", globalVar); if (++ function_count % 10 == 0) { Printf(f_builder_code, "];\n\ntable = [table;"); } - Printf(f_builder_code, "\"%s\",\"%s\";", getname, getname); + if (!( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))) { + Printf(f_builder_code, "\"%s\",\"%s\";", getname, getname); + } Delete(rowname); Delete(colname);