[Freeswitch-svn] [commit] r12960 - in freeswitch/trunk/src: include mod/languages/mod_managed mod/languages/mod_spidermonkey_core_db mod/languages/mod_spidermonkey_curl mod/languages/mod_spidermonkey_odbc mod/languages/mod_spidermonkey_socket mod/languages/mod_spidermonkey_teletone

FreeSWITCH SVN mikej at freeswitch.org
Thu Apr 9 08:28:52 PDT 2009


Author: mikej
Date: Thu Apr  9 10:28:52 2009
New Revision: 12960

Log:
fix windows calling conventions for modules with sub-modules broken in svn r12919

Modified:
   freeswitch/trunk/src/include/switch_platform.h
   freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp
   freeswitch/trunk/src/mod/languages/mod_managed/switch_platform.i
   freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
   freeswitch/trunk/src/mod/languages/mod_spidermonkey_curl/mod_spidermonkey_curl.c
   freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
   freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.c
   freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c

Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h	(original)
+++ freeswitch/trunk/src/include/switch_platform.h	Thu Apr  9 10:28:52 2009
@@ -145,13 +145,16 @@
 #define SWITCH_DECLARE_DATA				__declspec(dllimport)
 #endif
 #if defined(SWITCH_MOD_DECLARE_STATIC)
-#define SWITCH_MOD_DECLARE(type)		type __cdecl
+#define SWITCH_MOD_DECLARE(type)		type __stdcall
+#define SWITCH_MOD_DECLARE_NONSTD(type)	type __cdecl
 #define SWITCH_MOD_DECLARE_DATA
 #elif defined(MOD_EXPORTS)
 #define SWITCH_MOD_DECLARE(type)		__declspec(dllexport) type __stdcall
+#define SWITCH_MOD_DECLARE_NONSTD(type)	__declspec(dllexport) type __cdecl
 #define SWITCH_MOD_DECLARE_DATA			__declspec(dllexport)
 #else
 #define SWITCH_MOD_DECLARE(type)		__declspec(dllimport) type __stdcall
+#define SWITCH_MOD_DECLARE_NONSTD(type)	__declspec(dllimport) type __cdecl
 #define SWITCH_MOD_DECLARE_DATA			__declspec(dllimport)
 #endif
 #define SIGHUP SIGTERM
@@ -170,6 +173,7 @@
 #define SWITCH_DECLARE_NONSTD(type)	__attribute__((visibility("default"))) type
 #define SWITCH_DECLARE_DATA		__attribute__((visibility("default")))
 #define SWITCH_MOD_DECLARE(type)	__attribute__((visibility("default"))) type
+#define SWITCH_MOD_DECLARE_NONSTD(type)	__attribute__((visibility("default"))) type
 #define SWITCH_MOD_DECLARE_DATA		__attribute__((visibility("default")))
 #define SWITCH_DECLARE_CLASS		__attribute__((visibility("default")))
 #else
@@ -177,6 +181,7 @@
 #define SWITCH_DECLARE_NONSTD(type)	type
 #define SWITCH_DECLARE_DATA
 #define SWITCH_MOD_DECLARE(type)	type
+#define SWITCH_MOD_DECLARE_NONSTD(type)	type
 #define SWITCH_MOD_DECLARE_DATA
 #define SWITCH_DECLARE_CLASS
 #endif

Modified: freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp	Thu Apr  9 10:28:52 2009
@@ -77,7 +77,7 @@
 static executeBackgroundFunction executeBackgroundDelegate;
 static loadAssemblyFunction loadAssemblyDelegate;
 
-SWITCH_MOD_DECLARE(void) InitManagedDelegates(runFunction run, executeFunction execute, executeBackgroundFunction executeBackground, loadAssemblyFunction loadAssembly) 
+SWITCH_MOD_DECLARE_NONSTD(void) InitManagedDelegates(runFunction run, executeFunction execute, executeBackgroundFunction executeBackground, loadAssemblyFunction loadAssembly) 
 {
 	runDelegate = run;
 	executeDelegate = execute;
@@ -88,7 +88,7 @@
 // Sets up delegates (and anything else needed) on the ManagedSession object
 // Called from ManagedSession.Initialize Managed -> this is Unmanaged code so all pointers are marshalled and prevented from GC
 // Exported method.
-SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) 
+SWITCH_MOD_DECLARE_NONSTD(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) 
 {
 	switch_assert(session);
 	if (!session) {

Modified: freeswitch/trunk/src/mod/languages/mod_managed/switch_platform.i
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/switch_platform.i	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/switch_platform.i	Thu Apr  9 10:28:52 2009
@@ -31,6 +31,7 @@
 #define SWITCH_DECLARE(type) type
 #define SWITCH_DECLARE_NONSTD(type) type
 #define SWITCH_MOD_DECLARE(type) type
+#define SWITCH_MOD_DECLARE_NONSTD(type) type
 #define SWITCH_DECLARE_DATA
 #define SWITCH_MOD_DECLARE_DATA
 #define SWITCH_THREAD_FUNC

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c	Thu Apr  9 10:28:52 2009
@@ -332,7 +332,7 @@
 	/*.next */ NULL
 };
 
-SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+SWITCH_MOD_DECLARE_NONSTD(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
 {
 	*module_interface = &DB_module_interface;
 	return SWITCH_STATUS_SUCCESS;

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_curl/mod_spidermonkey_curl.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_curl/mod_spidermonkey_curl.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_curl/mod_spidermonkey_curl.c	Thu Apr  9 10:28:52 2009
@@ -240,7 +240,7 @@
 	/*.next */ NULL
 };
 
-SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+SWITCH_MOD_DECLARE_NONSTD(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
 {
 	curl_global_init(CURL_GLOBAL_ALL);
 	*module_interface = &curl_module_interface;

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c	Thu Apr  9 10:28:52 2009
@@ -533,7 +533,7 @@
 	/*.next */ NULL
 };
 
-SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+SWITCH_MOD_DECLARE_NONSTD(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
 {
 	*module_interface = &odbc_module_interface;
 	return SWITCH_STATUS_SUCCESS;

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.c	Thu Apr  9 10:28:52 2009
@@ -324,7 +324,7 @@
 	/*.next */ NULL
 };
 
-SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+SWITCH_MOD_DECLARE_NONSTD(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
 {
 	*module_interface = &socket_module_interface;
 	return SWITCH_STATUS_SUCCESS;

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c	Thu Apr  9 10:28:52 2009
@@ -346,7 +346,7 @@
 	/*.next */ NULL
 };
 
-SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+SWITCH_MOD_DECLARE_NONSTD(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
 {
 	*module_interface = &teletone_module_interface;
 	return SWITCH_STATUS_SUCCESS;



More information about the Freeswitch-svn mailing list