Merge branch 'stricter-warnings'
* stricter-warnings: Go changes for wrappers to compile as ISO C90 Scilab typecheck typemaps fix for C90 No error for one Javascript node warning Warning fix in testcase for Javascript node nested_extend_c testcase fix when compiled by C++ target languages Temporarily remove -Werror for Scilab testing C90 fixes for Javascript JSC There are a couple of testcases that aren't compliant and supression via pragmas doesn't work for gcc < 4.8 Warning suppression change Scilab typemap fixes for C89 compiler warning suppression correction in testcase Suppress pedantic warnings in C# testcases Suppress pedantic warnings in testcases Pedantic warning fix in testcase pedantic warning fix for D wrappers Travis testing to use testflags.py for setting CFLAGS and CXXFLAGS Add travis build for error-declaration-after-statement branch
This commit is contained in:
commit
1ef899a57b
25 changed files with 163 additions and 119 deletions
|
|
@ -1486,10 +1486,10 @@ private:
|
|||
// The single function parameter is a pointer to the real argument
|
||||
// values. Define the structure that it points to.
|
||||
|
||||
Printv(f->code, "\tstruct swigargs {\n", NULL);
|
||||
String *swigargs = NewString("\tstruct swigargs {\n");
|
||||
|
||||
if (parm_count > required_count) {
|
||||
Printv(f->code, "\t\tintgo _swig_optargc;\n", NULL);
|
||||
Printv(swigargs, "\t\tintgo _swig_optargc;\n", NULL);
|
||||
}
|
||||
|
||||
Parm *p = parms;
|
||||
|
|
@ -1499,7 +1499,7 @@ private:
|
|||
String *ln = Getattr(p, "lname");
|
||||
SwigType *pt = Getattr(p, "type");
|
||||
String *ct = gcCTypeForGoValue(p, pt, ln);
|
||||
Printv(f->code, "\t\t\t", ct, ";\n", NULL);
|
||||
Printv(swigargs, "\t\t\t", ct, ";\n", NULL);
|
||||
Delete(ct);
|
||||
|
||||
String *gn = NewStringf("_swig_go_%d", i);
|
||||
|
|
@ -1511,11 +1511,11 @@ private:
|
|||
p = nextParm(p);
|
||||
}
|
||||
if (SwigType_type(result) != T_VOID) {
|
||||
Printv(f->code, "\t\tlong : 0;\n", NULL);
|
||||
Printv(swigargs, "\t\tlong : 0;\n", NULL);
|
||||
String *ln = NewString(Swig_cresult_name());
|
||||
String *ct = gcCTypeForGoValue(n, result, ln);
|
||||
Delete(ln);
|
||||
Printv(f->code, "\t\t", ct, ";\n", NULL);
|
||||
Printv(swigargs, "\t\t", ct, ";\n", NULL);
|
||||
Delete(ct);
|
||||
|
||||
ln = NewString("_swig_go_result");
|
||||
|
|
@ -1524,9 +1524,7 @@ private:
|
|||
Delete(ct);
|
||||
Delete(ln);
|
||||
}
|
||||
Printv(f->code, "\t} *swig_a = (struct swigargs *) swig_v;\n", NULL);
|
||||
|
||||
Printv(f->code, "\n", NULL);
|
||||
Printv(swigargs, "\t} *swig_a = (struct swigargs *) swig_v;\n", NULL);
|
||||
|
||||
// Copy the input arguments out of the structure into the Go local
|
||||
// variables.
|
||||
|
|
@ -1574,12 +1572,15 @@ private:
|
|||
|
||||
cleanupFunction(n, f, parms);
|
||||
|
||||
Printv(f->locals, swigargs, NULL);
|
||||
|
||||
Printv(f->code, "}\n", NULL);
|
||||
|
||||
Wrapper_print(f, f_c_wrappers);
|
||||
|
||||
Swig_restore(n);
|
||||
|
||||
Delete(swigargs);
|
||||
DelWrapper(f);
|
||||
Delete(base_parm);
|
||||
|
||||
|
|
|
|||
|
|
@ -1792,6 +1792,7 @@ int JSCEmitter::emitNamespaces() {
|
|||
namespace_definition.replace("$jsglobalvariables", variables)
|
||||
.replace("$jsglobalfunctions", functions)
|
||||
.replace("$jsnspace", name_mangled)
|
||||
.replace("$jsmangledname", name_mangled)
|
||||
.pretty_print(f_wrap_cpp);
|
||||
|
||||
Template t_createNamespace(getTemplate("jsc_nspace_definition"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue