some fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11589 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f844123608
commit
8ee9175b6e
8 changed files with 576 additions and 214 deletions
|
|
@ -9,7 +9,6 @@ srcdir = @srcdir@
|
|||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
|
||||
|
||||
include $(srcdir)/../common.mk
|
||||
|
||||
# Overridden variables here
|
||||
|
|
@ -17,7 +16,7 @@ include $(srcdir)/../common.mk
|
|||
|
||||
# Rules for the different types of tests
|
||||
%.cpptest:
|
||||
|
||||
|
||||
%.ctest:
|
||||
$(setup)
|
||||
cp ../$*.i $*.i
|
||||
|
|
@ -37,7 +36,7 @@ run_testcase = \
|
|||
|
||||
# Clean: remove the generated .sci file
|
||||
%.clean:
|
||||
@rm -f $*.sci *_wrap.c *.i *.h
|
||||
@rm -f $*.sci *_wrap.c *.i *.h *_wrap.cxx
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile scilab_clean
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
exec loader.sce;
|
||||
|
||||
if signed_char_identity(-13) <> -13 then pause, end
|
||||
if unsigned_char_identity(251) <> 251 then pause, end
|
||||
if signed_short_identity(-31000) <> -31000 then pause, end
|
||||
if unsigned_short_identity(61000) <> 61000 then pause, end
|
||||
if signed_int_identity(42) <> 42 then pause, end
|
||||
if unsigned_int_identity(123456) <> 123456 then pause, end
|
||||
if signed_long_identity(65537) <> 65537 then pause, end
|
||||
if unsigned_long_identity(654321) <> 654321 then pause, end
|
||||
|
||||
exit
|
||||
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
%include <typemaps/swigmacros.swg>
|
||||
%include <typemaps/fragments.swg>
|
||||
%include <sciruntime.swg>
|
||||
%include <sciprimtypes.swg>
|
||||
%include <scitypemaps.swg>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -1,10 +1,15 @@
|
|||
%insert(runtime) "swigrun.swg";
|
||||
%insert(runtime) "swigerrors.swg";
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void SWIG_Error(int code, const char *msg) {
|
||||
Scierror(code, _("%s\n"), msg);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(999, msg); } else
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -188,7 +188,7 @@ public:
|
|||
if (overloaded)
|
||||
Append(overname, Getattr(n, "sym:overname"));
|
||||
|
||||
Printv(f->def, "int ", overname, " (char *fname,unsigned long fname_len) {\n", NIL);
|
||||
Printv(f->def, "int ", overname, " (char *fname, unsigned long fname_len) {\n", NIL);
|
||||
|
||||
/* Emit all of the local variables for holding arguments */
|
||||
emit_parameter_variables(l, f);
|
||||
|
|
@ -361,7 +361,7 @@ public:
|
|||
String *dispatch = Swig_overload_dispatch(n, "return %s(fname, fname_len);", &maxargs);
|
||||
String *tmp = NewString("");
|
||||
|
||||
Printv(f->def, "int ", wname, " (char *fname,unsigned long fname_len) {\n", NIL);
|
||||
Printv(f->def, "int ", wname, " (char *fname, unsigned long fname_len) {\n", NIL);
|
||||
Wrapper_add_local(f, "argc", "int argc = Rhs;");
|
||||
//Printf(tmp, "octave_value_ref argv[%d]={", maxargs);
|
||||
//for (int j = 0; j < maxargs; ++j)
|
||||
|
|
@ -369,7 +369,7 @@ public:
|
|||
//Printf(tmp, "}");
|
||||
//Wrapper_add_local(f, "argv", tmp);
|
||||
Printv(f->code, dispatch, "\n", NIL);
|
||||
Printf(f->code, "error(\"No matching function for overload\");\n", iname);
|
||||
Printf(f->code, "Scierror(999, _(\"No matching function for overload\"));\n");
|
||||
Printf(f->code, "return 0;\n");
|
||||
Printv(f->code, "}\n", NIL);
|
||||
|
||||
|
|
@ -418,7 +418,7 @@ public:
|
|||
Printf(globalVar, "int %s = 0;\n\n", iscomplexname);
|
||||
else
|
||||
Printf(globalVar, "\n");
|
||||
Printv(setf->def, "int ", setname, " (char *fname,unsigned long fname_len) {\n", NIL);
|
||||
Printv(setf->def, "int ", setname, " (char *fname, unsigned long fname_len) {\n", NIL);
|
||||
|
||||
/* Check the number of input and output */
|
||||
Printf(setf->def, "CheckRhs(1, 1);\n");
|
||||
|
|
@ -453,7 +453,7 @@ public:
|
|||
/* deal with the get function */
|
||||
Setattr(n, "wrap:name", getname);
|
||||
int addfail = 0;
|
||||
Printv(getf->def, "int ", getname, " (char *fname,unsigned long fname_len){\n", NIL);
|
||||
Printv(getf->def, "int ", getname, " (char *fname, unsigned long fname_len){\n", NIL);
|
||||
|
||||
/* Check the number of input and output */
|
||||
Printf(getf->def, "CheckRhs(0, 0);\n");
|
||||
|
|
@ -519,7 +519,7 @@ public:
|
|||
String *getname = Swig_name_get(iname);
|
||||
Setattr(n, "wrap:name", getname);
|
||||
int addfail = 0;
|
||||
Printv(getf->def, "int ", getname, " (char *fname,unsigned long fname_len){\n", NIL);
|
||||
Printv(getf->def, "int ", getname, " (char *fname, unsigned long fname_len){\n", NIL);
|
||||
|
||||
/* Check the number of input and output */
|
||||
Printf(getf->def, "CheckRhs(0, 0);\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue