From 8d3afaea70b0bf3857af75b088b1d06fc9f6d3f2 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 3 Oct 2008 17:05:57 +0000 Subject: [PATCH] define those only for the clr managed code. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9809 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../mod_managed/freeswitch_managed.h | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/mod/languages/mod_managed/freeswitch_managed.h b/src/mod/languages/mod_managed/freeswitch_managed.h index 331a50a9e9..c5fc57b7ea 100644 --- a/src/mod/languages/mod_managed/freeswitch_managed.h +++ b/src/mod/languages/mod_managed/freeswitch_managed.h @@ -42,6 +42,32 @@ typedef void (*hangupFunction)(void); typedef char* (*inputFunction)(void*, switch_input_type_t); #ifndef _MANAGED + +#include +#include + +#ifndef SWIG +struct mod_mono_globals { + MonoDomain *domain; + MonoAssembly *mod_mono_asm; + switch_memory_pool_t *pool; + switch_bool_t embedded; + + MonoMethod *loadMethod; + MonoMethod *unloadMethod; + MonoMethod *runMethod; + MonoMethod *executeMethod; + MonoMethod *executeBackgroundMethod; +}; + +typedef struct mod_mono_globals mod_mono_globals; +extern mod_mono_globals globals; +#endif +#endif + +SWITCH_END_EXTERN_C + +#ifdef _MANAGED // this section remove linker error LNK4248 for these opaque structures struct switch_core_session {char foo[];}; struct apr_pool_t {char foo[];}; @@ -72,32 +98,6 @@ typedef char* (*inputFunction)(void*, switch_input_type_t); struct apr_socket_t {char foo[];}; // LNK Error -#include -#include - -#ifndef SWIG -struct mod_mono_globals { - MonoDomain *domain; - MonoAssembly *mod_mono_asm; - switch_memory_pool_t *pool; - switch_bool_t embedded; - - MonoMethod *loadMethod; - MonoMethod *unloadMethod; - MonoMethod *runMethod; - MonoMethod *executeMethod; - MonoMethod *executeBackgroundMethod; -}; - -typedef struct mod_mono_globals mod_mono_globals; -extern mod_mono_globals globals; -#endif -#endif - -SWITCH_END_EXTERN_C - -#ifdef _MANAGED - using namespace System; using namespace System::Reflection; using namespace System::Runtime::InteropServices; @@ -134,4 +134,4 @@ public: hangupFunction hangupDelegate; }; -#endif \ No newline at end of file +#endif