Don't try to do magic with the (Swig swigrun) module in -runtime mode.
Move SWIG_Guile_Init in front of type registration, to allow type system synchronization. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6066 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
87ebbd67ee
commit
4c49fc803b
1 changed files with 2 additions and 17 deletions
|
|
@ -8,21 +8,6 @@
|
||||||
%runtime "precommon.swg"
|
%runtime "precommon.swg"
|
||||||
%runtime "common.swg"
|
%runtime "common.swg"
|
||||||
|
|
||||||
#ifdef SWIG_RUNTIME_MODE
|
|
||||||
/* Hook the runtime module initialization
|
|
||||||
into the shared initialization function SWIG_Guile_Init. */
|
|
||||||
%runtime %{
|
|
||||||
/* Hook the runtime module initialization
|
|
||||||
into the shared initialization function SWIG_Guile_Init. */
|
|
||||||
#include <libguile.h>
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
SCM scm_init_Swig_swigrun_module (void);
|
|
||||||
#define SWIG_INIT_RUNTIME_MODULE scm_init_Swig_swigrun_module();
|
|
||||||
%}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
%runtime "guile_scm_run.swg"
|
%runtime "guile_scm_run.swg"
|
||||||
%include "ghinterface.i"
|
%include "ghinterface.i"
|
||||||
%include "guile.i"
|
%include "guile.i"
|
||||||
|
|
@ -56,6 +41,8 @@ SCM scm_init_Swig_swigrun_module (void);
|
||||||
%init %{
|
%init %{
|
||||||
static int _swig_init = 0;
|
static int _swig_init = 0;
|
||||||
|
|
||||||
|
SWIG_Guile_Init();
|
||||||
|
|
||||||
if (!_swig_init) {
|
if (!_swig_init) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; swig_types_initial[i]; i++) {
|
for (i = 0; swig_types_initial[i]; i++) {
|
||||||
|
|
@ -66,6 +53,4 @@ SCM scm_init_Swig_swigrun_module (void);
|
||||||
}
|
}
|
||||||
_swig_init = 1;
|
_swig_init = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIG_Guile_Init();
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue