define those only for the clr managed code.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9809 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-10-03 17:05:57 +00:00
parent 667fd78821
commit 8d3afaea70
1 changed files with 27 additions and 27 deletions

View File

@ -42,6 +42,32 @@ typedef void (*hangupFunction)(void);
typedef char* (*inputFunction)(void*, switch_input_type_t);
#ifndef _MANAGED
#include <mono/jit/jit.h>
#include <mono/metadata/assembly.h>
#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 <mono/jit/jit.h>
#include <mono/metadata/assembly.h>
#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;