Scilab: fix dynamic_cast test case

Close SWIG_Init() in Scilab executable.
This commit is contained in:
Simon Marchetto 2013-07-23 15:02:39 +02:00
commit 25ffa87cab
2 changed files with 5 additions and 8 deletions

View file

@ -230,9 +230,7 @@ SwigScilabRaise(const char *type) {
%}
%insert("init")
%{
%init %{
#define SWIG_GetModule(clientdata) SWIG_Scilab_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Scilab_SetModule(pointer)
@ -246,18 +244,14 @@ SWIGRUNTIME void
SWIG_Scilab_SetModule(swig_module_info *swig_module)
{
}
%}
%insert(init) "swiginit.swg"
%init %{
#ifdef __cplusplus
extern "C" {
extern "C"
int SWIG_Init(char *fname, unsigned long fname_len) {
SWIG_InitializeModule(NULL);
return 0;
}
}
#endif
%}

View file

@ -208,6 +208,9 @@ public:
Close(builderFile);
Delete(builderFile);
/* Close the init function (opened in sciinit.swg) */
Printf(initSection, "return 0;\n}\n");
/* Write all to the wrapper file */
SwigType_emit_type_table(runtimeSection, wrappersSection); // Declare pointer types, ... (Ex: SWIGTYPE_p_p_double)
Dump(runtimeSection, beginSection);