]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3315 Fix this differently convert to cdecl so SWIG likes
authorJeff Lenk <jeff@jefflenk.com>
Wed, 1 Jun 2011 15:48:42 +0000 (10:48 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Wed, 1 Jun 2011 15:48:42 +0000 (10:48 -0500)
src/include/switch_platform.h
src/include/switch_regex.h
src/include/switch_types.h
src/switch_regex.c

index 7603b585444b7a0f7a6433967a84de9d1b78f124..609dde8b7a42f7db4621a92b8112309578837fc3 100644 (file)
@@ -137,17 +137,14 @@ typedef int gid_t;
 #ifdef WIN32
 #if defined(SWITCH_CORE_DECLARE_STATIC)
 #define SWITCH_DECLARE(type)                   type __stdcall
-#define SWITCH_DECLARE_TYPEDEF(type, name)     type (__stdcall name)
 #define SWITCH_DECLARE_NONSTD(type)            type __cdecl
 #define SWITCH_DECLARE_DATA
 #elif defined(FREESWITCHCORE_EXPORTS)
 #define SWITCH_DECLARE(type)                   __declspec(dllexport) type __stdcall
-#define SWITCH_DECLARE_TYPEDEF(type, name)     __declspec(dllexport) type (__stdcall name)
 #define SWITCH_DECLARE_NONSTD(type)            __declspec(dllexport) type __cdecl
 #define SWITCH_DECLARE_DATA                            __declspec(dllexport)
 #else
 #define SWITCH_DECLARE(type)                   __declspec(dllimport) type __stdcall
-#define SWITCH_DECLARE_TYPEDEF(type, name)     __declspec(dllimport) type (__stdcall name)
 #define SWITCH_DECLARE_NONSTD(type)            __declspec(dllimport) type __cdecl
 #define SWITCH_DECLARE_DATA                            __declspec(dllimport)
 #endif
@@ -177,7 +174,6 @@ typedef int gid_t;
 #define O_BINARY 0
 #if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(SWITCH_API_VISIBILITY)
 #define SWITCH_DECLARE(type)           __attribute__((visibility("default"))) type
-#define SWITCH_DECLARE_TYPEDEF(type, name)     type (name)
 #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
@@ -186,7 +182,6 @@ typedef int gid_t;
 #define SWITCH_DECLARE_CLASS           __attribute__((visibility("default")))
 #else
 #define SWITCH_DECLARE(type)           type
-#define SWITCH_DECLARE_TYPEDEF(type, name)     type (name)
 #define SWITCH_DECLARE_NONSTD(type)    type
 #define SWITCH_DECLARE_DATA
 #define SWITCH_MOD_DECLARE(type)       type
index 15b54aa09e975bb903dd02e3b0f0dbc45045b752..27f4852966e4fadd0bf049f4a4ccc89f3623f921 100644 (file)
@@ -73,7 +73,7 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match_partial(const char *target, c
 SWITCH_DECLARE(void) switch_capture_regex(switch_regex_t *re, int match_count, const char *field_data, 
                                                                                  int *ovector, const char *var, switch_cap_callback_t callback, void *user_data);
 
-SWITCH_DECLARE(void) switch_regex_set_var_callback(const char *var, const char *val, void *user_data);
+SWITCH_DECLARE_NONSTD(void) switch_regex_set_var_callback(const char *var, const char *val, void *user_data);
 
 #define switch_regex_safe_free(re)     if (re) {\
                                switch_regex_free(re);\
index a94bfbd29bd9e3e231def487cfd7681dcbed2cde..2b2b3de45d4798cb28276ae0313507ec4a95c5ac 100644 (file)
@@ -1690,7 +1690,7 @@ struct switch_console_callback_match {
 };
 typedef struct switch_console_callback_match switch_console_callback_match_t;
 
-typedef SWITCH_DECLARE_TYPEDEF(void, *switch_cap_callback_t) (const char *var, const char *val, void *user_data);
+typedef void (*switch_cap_callback_t) (const char *var, const char *val, void *user_data);
 typedef switch_status_t (*switch_console_complete_callback_t) (const char *, const char *, switch_console_callback_match_t **matches);
 typedef switch_bool_t (*switch_media_bug_callback_t) (switch_media_bug_t *, void *, switch_abc_type_t);
 typedef switch_bool_t (*switch_tone_detect_callback_t) (switch_core_session_t *, const char *, const char *);
index 3cfa01e116b8c02aa7121b23c525f0a199179c2e..e6aa375077acb8c8a69e8643ad184b3638b45931 100644 (file)
@@ -249,7 +249,7 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match(const char *target, const cha
        return switch_regex_match_partial(target, expression, &partial);
 }
 
-SWITCH_DECLARE(void) switch_regex_set_var_callback(const char *var, const char *val, void *user_data)
+SWITCH_DECLARE_NONSTD(void) switch_regex_set_var_callback(const char *var, const char *val, void *user_data)
 {
        switch_core_session_t *session = (switch_core_session_t *) user_data;
        switch_channel_t *channel = switch_core_session_get_channel(session);