Scilab: fix dynamic_cast test error
This commit is contained in:
parent
ca2ee4ff98
commit
caf2db6b8d
2 changed files with 12 additions and 9 deletions
|
|
@ -267,3 +267,12 @@ SWIG_Scilab_SetModule(swig_module_info *swig_module)
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%insert(init) "swiginit.swg"
|
%insert(init) "swiginit.swg"
|
||||||
|
|
||||||
|
%init %{
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int <module>_Init(char *fname, unsigned long fname_len) {
|
||||||
|
SWIG_InitializeModule(NULL);
|
||||||
|
SWIG_CreateScilabVariables();
|
||||||
|
%}
|
||||||
|
|
|
||||||
|
|
@ -198,15 +198,9 @@ public:
|
||||||
saveBuilderFile();
|
saveBuilderFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add initialization function to init section
|
/* Close the init function and rename with module name */
|
||||||
Printf(initSection, "#ifdef __cplusplus\n");
|
Printf(initSection, "return 0;\n}\n");
|
||||||
Printf(initSection, "extern \"C\"\n");
|
Replaceall(initSection, "<module>", moduleName);
|
||||||
Printf(initSection, "#endif\n");
|
|
||||||
Printf(initSection, "int %s(char *fname, unsigned long fname_len) {\n", moduleInitFunctionName);
|
|
||||||
Printf(initSection, " SWIG_InitializeModule(NULL);\n");
|
|
||||||
Printf(initSection, " SWIG_CreateScilabVariables();\n");
|
|
||||||
Printf(initSection, "return 0;\n");
|
|
||||||
Printf(initSection, "}\n");
|
|
||||||
|
|
||||||
/* Write all to the wrapper file */
|
/* Write all to the wrapper file */
|
||||||
SwigType_emit_type_table(runtimeSection, wrappersSection); // Declare pointer types, ... (Ex: SWIGTYPE_p_p_double)
|
SwigType_emit_type_table(runtimeSection, wrappersSection); // Declare pointer types, ... (Ex: SWIGTYPE_p_p_double)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue