提交 2123b46d authored 作者: Michael Jerris's avatar Michael Jerris

tweak calling conventions.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10124 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0f346908
...@@ -38,8 +38,17 @@ SWITCH_BEGIN_EXTERN_C ...@@ -38,8 +38,17 @@ SWITCH_BEGIN_EXTERN_C
#include <switch.h> #include <switch.h>
#include <switch_cpp.h> #include <switch_cpp.h>
typedef void (*hangupFunction)(void); /* calling conventions for Windows */
typedef char* (*inputFunction)(void*, switch_input_type_t); #ifndef MANAGED_STDCALL
#ifdef WIN32
# define MANAGED_STDCALL __stdcall
# else
# define MANAGED_STDCALL
# endif
#endif
typedef void (MANAGED_STDCALL *hangupFunction)(void);
typedef char* (MANAGED_STDCALL *inputFunction)(void*, switch_input_type_t);
#ifndef _MANAGED #ifndef _MANAGED
......
...@@ -68,10 +68,10 @@ SWITCH_STANDARD_API(managed_loadassembly); /* Load assembly */ ...@@ -68,10 +68,10 @@ SWITCH_STANDARD_API(managed_loadassembly); /* Load assembly */
mod_managed_globals globals = { 0 }; mod_managed_globals globals = { 0 };
// Global delegates to call managed functions // Global delegates to call managed functions
typedef int (*runFunction)(const char *data, void *sessionPtr); typedef int (MANAGED_STDCALL *runFunction)(const char *data, void *sessionPtr);
typedef int (*executeFunction)(const char *cmd, void *stream, void *Event); typedef int (MANAGED_STDCALL *executeFunction)(const char *cmd, void *stream, void *Event);
typedef int (*executeBackgroundFunction)(const char* cmd); typedef int (MANAGED_STDCALL *executeBackgroundFunction)(const char* cmd);
typedef int (*loadAssemblyFunction)(const char* filename); typedef int (MANAGED_STDCALL *loadAssemblyFunction)(const char* filename);
static runFunction runDelegate; static runFunction runDelegate;
static executeFunction executeDelegate; static executeFunction executeDelegate;
static executeBackgroundFunction executeBackgroundDelegate; static executeBackgroundFunction executeBackgroundDelegate;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论