Make declared and defined linkage of SWIG_init consistent.

Reported by Steven G. Johnson.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7749 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2005-10-30 16:40:20 +00:00
commit 220210c3b3

View file

@ -379,27 +379,26 @@ public:
module = Swig_copy_string(Char(Getattr(n,"name")));
if (CPlusPlus) {
Printf(f_runtime, "extern \"C\" {\n\n");
}
switch (linkage) {
case GUILE_LSTYLE_SIMPLE:
/* Simple linkage; we have to export the SWIG_init function. The user can
rename the function by a #define. */
Printf (f_runtime, "extern void\nSWIG_init (void)\n;\n");
Printf (f_init, "#define SWIG_GUILE_INIT_STATIC static\n");
Printf (f_runtime, "#define SWIG_GUILE_INIT_STATIC extern\n");
break;
default:
/* Other linkage; we make the SWIG_init function static */
Printf (f_runtime, "static void\nSWIG_init (void)\n;\n");
Printf (f_init, "#define SWIG_GUILE_INIT_STATIC extern\n");
Printf (f_runtime, "#define SWIG_GUILE_INIT_STATIC static\n");
break;
}
if (CPlusPlus) {
Printf(f_runtime, "extern \"C\" {\n\n");
}
Printf (f_runtime, "SWIG_GUILE_INIT_STATIC void\nSWIG_init (void);\n");
if (CPlusPlus) {
Printf(f_runtime, "\n}\n");
}
Language::top(n);
/* Close module */