Don't produce invalid C code when invoked with the
-declaremodule option. Reported by Tim Brown, SF #891108. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5723 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0eea0c3316
commit
aa3f0b2b30
1 changed files with 6 additions and 4 deletions
|
|
@ -157,9 +157,11 @@ public:
|
||||||
SwigType_emit_type_table (f_runtime, f_wrappers);
|
SwigType_emit_type_table (f_runtime, f_wrappers);
|
||||||
if (!noinit) {
|
if (!noinit) {
|
||||||
Printf(f_init, "Scheme_Object *scheme_reload(Scheme_Env *env) {\n");
|
Printf(f_init, "Scheme_Object *scheme_reload(Scheme_Env *env) {\n");
|
||||||
Printf(f_init, "\tScheme_Env *menv = env;\n");
|
|
||||||
if (declaremodule) {
|
if (declaremodule) {
|
||||||
Printf(f_init, "\tmenv = scheme_primitive_module(scheme_intern_symbol(\"%s\"), env);\n", module);
|
Printf(f_init, "\tScheme_Env *menv = scheme_primitive_module(scheme_intern_symbol(\"%s\"), env);\n", module);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Printf(f_init, "\tScheme_Env *menv = env;\n");
|
||||||
}
|
}
|
||||||
Printf(f_init, "%s\n", Char(init_func_def));
|
Printf(f_init, "%s\n", Char(init_func_def));
|
||||||
if (declaremodule) {
|
if (declaremodule) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue