From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Mono/MonoIncludes.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Runtime/Mono/MonoIncludes.h (limited to 'Runtime/Mono/MonoIncludes.h') diff --git a/Runtime/Mono/MonoIncludes.h b/Runtime/Mono/MonoIncludes.h new file mode 100644 index 0000000..4b69b9d --- /dev/null +++ b/Runtime/Mono/MonoIncludes.h @@ -0,0 +1,40 @@ +#ifndef MONOINCLUDES_H +#define MONOINCLUDES_H + +#include "Configuration/UnityConfigure.h" +#include "MonoTypes.h" +#include "MonoTypeSignatures.h" + +#ifndef __cplusplus +#error somewhat unexpected +#endif + + +extern "C" +{ + +// on windows and linux, we always load mono functions dynamically + +#if ENABLE_MONO + +#define mono_string_chars(s) ((gunichar2*)&((s)->firstCharacter)) +#define mono_string_length(s) ((s)->length) + +#if (WEBPLUG || UNITY_WIN || UNITY_LINUX) && !UNITY_PEPPER + +#define DO_API(r,n,p) extern EXPORT_COREMODULE r (*n) p; +#include "MonoFunctions.h" + +#else // WEBPLUG || UNITY_WIN || UNITY_LINUX + +#define DO_API(r,n,p) r n p; +#define DO_API_NO_RETURN(r,n,p) DOES_NOT_RETURN r n p; +#include "MonoFunctions.h" + +#endif // WEBPLUG || UNITY_WIN || UNITY_LINUX + +#endif // ENABLE_MONO + +} + +#endif -- cgit v1.1-26-g67d0