Uniform handling of SWIGEXPORT across SWIG.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7234 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
27270d050d
commit
c25d1c8e35
8 changed files with 20 additions and 51 deletions
|
|
@ -671,7 +671,7 @@ $result = C_SCHEME_UNDEFINED;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Chicken initialization function */
|
/* Chicken initialization function */
|
||||||
SWIGEXPORT(void) SWIG_init(C_word, C_word, C_word) C_noret;
|
SWIGEXPORT void SWIG_init(C_word, C_word, C_word) C_noret;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -686,8 +686,7 @@ SWIGEXPORT(void) SWIG_init(C_word, C_word, C_word) C_noret;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
SWIGEXPORT(void)
|
SWIGEXPORTvoid SWIG_init(C_word argc, C_word closure, C_word continuation) {
|
||||||
SWIG_init(C_word argc, C_word closure, C_word continuation) {
|
|
||||||
int i;
|
int i;
|
||||||
C_word sym;
|
C_word sym;
|
||||||
C_word tmp;
|
C_word tmp;
|
||||||
|
|
|
||||||
|
|
@ -41,26 +41,6 @@ typedef SCM (*swig_guile_proc)();
|
||||||
(char *) FUNC_NAME, (char *) msg, \
|
(char *) FUNC_NAME, (char *) msg, \
|
||||||
SCM_EOL, SCM_BOOL_F); else
|
SCM_EOL, SCM_BOOL_F); else
|
||||||
|
|
||||||
#ifndef SWIGEXPORT
|
|
||||||
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|
||||||
# if defined(_MSC_VER) || defined(__GNUC__)
|
|
||||||
# if defined(STATIC_LINKED)
|
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
# else
|
|
||||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# if defined(__BORLANDC__)
|
|
||||||
# define SWIGEXPORT(a) a _export
|
|
||||||
# else
|
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* SCM_CHAR and SCM_CHARP were introduced in Guile 1.4; the following is for
|
/* SCM_CHAR and SCM_CHARP were introduced in Guile 1.4; the following is for
|
||||||
1.3.4 compatibility. */
|
1.3.4 compatibility. */
|
||||||
#ifndef SCM_CHAR
|
#ifndef SCM_CHAR
|
||||||
|
|
@ -117,8 +97,8 @@ SWIG_GUILE_MODULE_STATIC void SWIG_Guile_SetModule(swig_module_info *pointer) {
|
||||||
swig_guile_module = pointer;
|
swig_guile_module = pointer;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
SWIGEXPORT(swig_module_info *) SWIG_Guile_GetModule();
|
SWIGEXPORT swig_module_info * SWIG_Guile_GetModule();
|
||||||
SWIGEXPORT(void) SWIG_Guile_SetModule(swig_module_info *pointer);
|
SWIGEXPORT void SWIG_Guile_SetModule(swig_module_info *pointer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static SCM
|
static SCM
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,13 @@
|
||||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||||
# if defined(_MSC_VER) || defined(__GNUC__)
|
# if defined(STATIC_LINKED)
|
||||||
# if defined(STATIC_LINKED)
|
# define SWIGEXPORT
|
||||||
# define SWIGEXPORT(a) a
|
# else
|
||||||
# else
|
# define SWIGEXPORT __declspec(dllexport)
|
||||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
# endif
|
||||||
# endif
|
# else
|
||||||
# else
|
|
||||||
# if defined(__BORLANDC__)
|
|
||||||
# define SWIGEXPORT(a) a _export
|
|
||||||
# else
|
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void *ptr = 0;
|
static void *ptr = 0;
|
||||||
SWIGEXPORT(void *)
|
SWIGEXPORT void *
|
||||||
SWIG_ReturnGlobalTypeList(void *t) {
|
SWIG_ReturnGlobalTypeList(void *t) {
|
||||||
if (!ptr && !t) ptr = t;
|
if (!ptr && !t) ptr = t;
|
||||||
return ptr;
|
return ptr;
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ extern "C"
|
||||||
#endif
|
#endif
|
||||||
#ifndef PERL_OBJECT
|
#ifndef PERL_OBJECT
|
||||||
#ifndef MULTIPLICITY
|
#ifndef MULTIPLICITY
|
||||||
SWIGEXPORT(void) SWIG_init (CV* cv);
|
SWIGEXPORT void SWIG_init (CV* cv);
|
||||||
#else
|
#else
|
||||||
SWIGEXPORT(void) SWIG_init (pTHXo_ CV* cv);
|
SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
SWIGEXPORT(void) SWIG_init (CV *cv, CPerlObj *);
|
SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
SWIGEXPORT(void) SWIG_init(void) {
|
SWIGEXPORT void SWIG_init(void) {
|
||||||
static PyObject *SWIG_globals = 0;
|
static PyObject *SWIG_globals = 0;
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
|
if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
|
||||||
|
|
|
||||||
|
|
@ -626,7 +626,7 @@ extern "C" {
|
||||||
#ifdef MAC_TCL
|
#ifdef MAC_TCL
|
||||||
#pragma export on
|
#pragma export on
|
||||||
#endif
|
#endif
|
||||||
SWIGEXPORT(int) SWIG_init(Tcl_Interp *);
|
SWIGEXPORT int SWIG_init(Tcl_Interp *);
|
||||||
#ifdef MAC_TCL
|
#ifdef MAC_TCL
|
||||||
#pragma export off
|
#pragma export off
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -641,7 +641,7 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *);
|
||||||
%insert(init) "swiginit.swg"
|
%insert(init) "swiginit.swg"
|
||||||
|
|
||||||
%init %{
|
%init %{
|
||||||
SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
|
SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
|
||||||
int i;
|
int i;
|
||||||
if (interp == 0) return TCL_ERROR;
|
if (interp == 0) return TCL_ERROR;
|
||||||
#ifdef USE_TCL_STUBS
|
#ifdef USE_TCL_STUBS
|
||||||
|
|
|
||||||
|
|
@ -446,7 +446,7 @@ public:
|
||||||
"#ifdef __cplusplus\n",
|
"#ifdef __cplusplus\n",
|
||||||
"extern \"C\"\n",
|
"extern \"C\"\n",
|
||||||
"#endif\n",
|
"#endif\n",
|
||||||
"SWIGEXPORT(void) Init_", feature, "(void) {\n",
|
"SWIGEXPORT void Init_", feature, "(void) {\n",
|
||||||
"int i;\n",
|
"int i;\n",
|
||||||
"\n",
|
"\n",
|
||||||
NIL);
|
NIL);
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ public:
|
||||||
Printf(f_init,"return TCL_OK;\n}\n");
|
Printf(f_init,"return TCL_OK;\n}\n");
|
||||||
|
|
||||||
if (!nosafe) {
|
if (!nosafe) {
|
||||||
Printf(f_init,"SWIGEXPORT(int) %(title)s_SafeInit(Tcl_Interp *interp) {\n", module );
|
Printf(f_init,"SWIGEXPORT int %(title)s_SafeInit(Tcl_Interp *interp) {\n", module );
|
||||||
Printf(f_init," return SWIG_init(interp);\n");
|
Printf(f_init," return SWIG_init(interp);\n");
|
||||||
Printf(f_init,"}\n");
|
Printf(f_init,"}\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue