add 'funcptr, inctest, integers, preproc, name' testcases and fix the empty testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11566 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4ca1d4c19e
commit
0623fdff8b
7 changed files with 78 additions and 10 deletions
|
|
@ -26,10 +26,11 @@ private:
|
|||
File *f_init;
|
||||
|
||||
String *f_builder_code;
|
||||
bool hasfunction_flag;
|
||||
|
||||
public:
|
||||
SCILAB():
|
||||
f_builder_code(NewString("")) {
|
||||
f_builder_code(NewString("")), hasfunction_flag(false) {
|
||||
allow_overloading();
|
||||
}
|
||||
|
||||
|
|
@ -110,14 +111,19 @@ public:
|
|||
Language::top(n);
|
||||
|
||||
/* create the file to generate the module: "builder.sce" */
|
||||
Printf(f_builder_code, "];\n");
|
||||
Printf(f_builder_code, "ilib_build(ilib_name,table,files,libs);\n");
|
||||
Printf(f_builder_code, "exit");
|
||||
File *f_builder=NewFile(NewStringf("%sbuilder.sce", SWIG_output_directory()), "w", SWIG_output_files());
|
||||
Printv(f_builder, f_builder_code, NIL);
|
||||
Close(f_builder);
|
||||
Delete(f_builder);
|
||||
Delete(f_builder_code);
|
||||
if(hasfunction_flag) {
|
||||
Printf(f_builder_code, "];\n");
|
||||
Printf(f_builder_code, "ilib_build(ilib_name,table,files,libs);\n");
|
||||
Printf(f_builder_code, "exit");
|
||||
File *f_builder=NewFile(NewStringf("%sbuilder.sce", SWIG_output_directory()), "w", SWIG_output_files());
|
||||
Printv(f_builder, f_builder_code, NIL);
|
||||
Close(f_builder);
|
||||
Delete(f_builder);
|
||||
Delete(f_builder_code);
|
||||
}
|
||||
else {
|
||||
Delete(f_builder_code);
|
||||
}
|
||||
|
||||
/* Dump out all the files */
|
||||
SwigType_emit_type_table(f_runtime, f_wrappers);
|
||||
|
|
@ -143,6 +149,8 @@ public:
|
|||
|
||||
virtual int functionWrapper(Node *n) {
|
||||
|
||||
hasfunction_flag = true;
|
||||
|
||||
/* A new wrapper function object */
|
||||
Wrapper *f = NewWrapper();
|
||||
Parm *p;
|
||||
|
|
@ -366,6 +374,8 @@ public:
|
|||
|
||||
virtual int variableWrapper(Node *n) {
|
||||
|
||||
hasfunction_flag = true;
|
||||
|
||||
/* Get the useful information from the node */
|
||||
String *name = Getattr(n, "name");
|
||||
String *iname = Getattr(n, "sym:name");
|
||||
|
|
@ -479,6 +489,8 @@ public:
|
|||
|
||||
virtual int constantWrapper(Node *n) {
|
||||
|
||||
hasfunction_flag = true;
|
||||
|
||||
/* Get the useful information from the node */
|
||||
String *name = Getattr(n, "name");
|
||||
String *iname = Getattr(n, "sym:name");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue