fix the type long long issue
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12010 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
66d48198e7
commit
7bd3e45dae
1 changed files with 12 additions and 0 deletions
|
|
@ -214,6 +214,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
SwigType *pt = Getattr(p, "type");
|
SwigType *pt = Getattr(p, "type");
|
||||||
|
if ( Equal(SwigType_base(pt), "long long") || Equal(SwigType_base(pt), "unsigned long long"))
|
||||||
|
Printv(f->code, " #ifdef __SCILAB_INT64__\n", NIL);
|
||||||
|
|
||||||
/* Get typemap for this argument */
|
/* Get typemap for this argument */
|
||||||
String *tm = Getattr(p, "tmap:in");
|
String *tm = Getattr(p, "tmap:in");
|
||||||
|
|
@ -231,6 +233,8 @@ public:
|
||||||
else
|
else
|
||||||
Printv(getargs, tm, NIL);
|
Printv(getargs, tm, NIL);
|
||||||
Printv(f->code, getargs, "\n", 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);
|
||||||
Delete(getargs);
|
Delete(getargs);
|
||||||
p = Getattr(p, "tmap:in:next");
|
p = Getattr(p, "tmap:in:next");
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -437,6 +441,8 @@ public:
|
||||||
Printf(globalVar, "int %s = 0;\n\n", iscomplexname);
|
Printf(globalVar, "int %s = 0;\n\n", iscomplexname);
|
||||||
else
|
else
|
||||||
Printf(globalVar, "\n");
|
Printf(globalVar, "\n");
|
||||||
|
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))
|
||||||
|
Printv(setf->def, "#ifdef __SCILAB_INT64__\n", NIL);
|
||||||
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 */
|
/* Check the number of input and output */
|
||||||
|
|
@ -466,6 +472,8 @@ public:
|
||||||
Append(setf->code, "SWIG_Error(999, \"attempt to set immutable member variable\");");
|
Append(setf->code, "SWIG_Error(999, \"attempt to set immutable member variable\");");
|
||||||
}
|
}
|
||||||
Append(setf->code, "}\n");
|
Append(setf->code, "}\n");
|
||||||
|
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))
|
||||||
|
Printv(setf->def, "#endif\n", NIL);
|
||||||
Wrapper_print(setf, f_wrappers);
|
Wrapper_print(setf, f_wrappers);
|
||||||
if (++ function_count % 10 == 0) {
|
if (++ function_count % 10 == 0) {
|
||||||
Printf(f_builder_code, "];\n\ntable = [table;");
|
Printf(f_builder_code, "];\n\ntable = [table;");
|
||||||
|
|
@ -475,6 +483,8 @@ public:
|
||||||
/* Deal with the get function */
|
/* Deal with the get function */
|
||||||
Setattr(n, "wrap:name", getname);
|
Setattr(n, "wrap:name", getname);
|
||||||
int addfail = 0;
|
int addfail = 0;
|
||||||
|
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))
|
||||||
|
Printv(getf->def, " #ifdef __SCILAB_INT64__\n", NIL);
|
||||||
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 */
|
/* Check the number of input and output */
|
||||||
|
|
@ -504,6 +514,8 @@ public:
|
||||||
/* Dump the wrapper function */
|
/* Dump the wrapper function */
|
||||||
Printf(getf->code, "LhsVar(iOutNum) = iVarOut;\n");
|
Printf(getf->code, "LhsVar(iOutNum) = iVarOut;\n");
|
||||||
Append(getf->code, "}\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);
|
||||||
Wrapper_print(getf, f_wrappers);
|
Wrapper_print(getf, f_wrappers);
|
||||||
Printf(f_header,"%s", globalVar);
|
Printf(f_header,"%s", globalVar);
|
||||||
if (++ function_count % 10 == 0) {
|
if (++ function_count % 10 == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue