summaryrefslogtreecommitdiff
path: root/Runtime/Lua/LuaBind/LuaBindConfig.h
blob: d2cbff7fe20ef27e391089335bfe5bb6f104236b (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef __LUA_BIND_TYPE_H__
#define __LUA_BIND_TYPE_H__

#include <iostream>

extern "C" {
#include "ThirdParty/lua51/lua.h"
#include "ThirdParty/lua51/lualib.h"
#include "ThirdParty/lua51/lauxlib.h"
}

#include <assert.h>

namespace LuaBind
{

	typedef unsigned int       uint;
	typedef unsigned long      uintptr;
	typedef long               sintptr;

	typedef const char         cc8;

	typedef unsigned char      u8;
	typedef unsigned short     u16;
	typedef unsigned int       u32;
	typedef unsigned long long u64;

	typedef signed char        s8;
	typedef signed short       s16;
	typedef signed int         s32;
	typedef signed long long   s64;

#ifdef _WIN32
	#define LUA_BIND_FINAL final
	#define LUA_BIND_LIBRARY_EXPORT __declspec(dllexport)
	#define LUA_BIND_LIBRARY_IMPORT __declspec(dllimport)
	#define LUA_BIND_FORCE_INLINE __forceinline
	#define LUA_BIND_RESTRICT __restrict
	#define LUA_BIND_ATTRIBUTE_USED	
	#define LUA_BIND_ABSTRACT
	#define LUA_BIND_API LUA_BIND_LIBRARY_EXPORT
#else 
	#define  LUA_BIND_FINAL final
	#define LUA_BIND_LIBRARY_EXPORT __attribute__((visibility("default")))
	#define LUA_BIND_LIBRARY_IMPORT 
	#define LUA_BIND_FORCE_INLINE __attribute__((always_inline)) inline
	#define LUA_BIND_RESTRICT __restrict__
	#define LUA_BIND_ATTRIBUTE_USED __attribute__((used))
	#define LUA_BIND_ABSTRACT
	#define LUA_BIND_API LUA_BIND_LIBRARY_EXPORT
#endif

#define LUA_BIND_PROFILER 0

}

#if LUA_BIND_PROFILER 
#include <iostream>
#endif

#endif // __LUA_BIND_TYPE_H__