Scilab: wrap SWIG_Init() function to initialize module SWIG types (needed for STL support)

This commit is contained in:
Simon Marchetto 2013-07-17 16:31:34 +02:00
commit 3dd0ebdde9
2 changed files with 34 additions and 9 deletions

View file

@ -230,11 +230,34 @@ SwigScilabRaise(const char *type) {
%}
//%insert(init) "swiginit.swg"
%init %{
/* -----------------------------------------------------------------------------*
* Partial Init method
* -----------------------------------------------------------------------------*/
%insert("init")
%{
#define SWIG_GetModule(clientdata) SWIG_Scilab_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Scilab_SetModule(pointer)
SWIGRUNTIME swig_module_info*
SWIG_Scilab_GetModule(void)
{
return NULL;
}
SWIGRUNTIME void
SWIG_Scilab_SetModule(swig_module_info *swig_module)
{
}
SWIGEXPORT int SWIG_init(void) {
%}
%insert(init) "swiginit.swg"
%init %{
#ifdef __cplusplus
extern "C" {
int SWIG_Init(char *fname, unsigned long fname_len) {
SWIG_InitializeModule(NULL);
return 0;
}
}
#endif
%}