summaryrefslogtreecommitdiff
path: root/Runtime/Mono/MonoIncludes.h
blob: 4b69b9d0ee813a40dfb17c86111f6888df15b0a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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