1 /*
2 script/lua_api/l_internal.h
3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4 */
5 
6 /*
7 This file is part of Freeminer.
8 
9 Freeminer is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Freeminer  is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Freeminer.  If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 /******************************************************************************/
24 /******************************************************************************/
25 /* WARNING!!!! do NOT add this header in any include file or any code file    */
26 /*             not being a modapi file!!!!!!!!                                */
27 /******************************************************************************/
28 /******************************************************************************/
29 
30 #ifndef L_INTERNAL_H_
31 #define L_INTERNAL_H_
32 
33 #include "common/c_internal.h"
34 
35 #define luamethod(class, name) {#name, class::l_##name}
36 #define API_FCT(name) registerFunction(L, #name, l_##name,top)
37 #define ASYNC_API_FCT(name) engine.registerFunction(#name, l_##name)
38 
39 #if (defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE))
40 #define NO_MAP_LOCK_REQUIRED
41 #else
42 #include "main.h"
43 #include "profiler.h"
44 #define NO_MAP_LOCK_REQUIRED \
45 	ScopeProfiler nolocktime(g_profiler,"Scriptapi: unlockable time",SPT_ADD)
46 #endif
47 
48 #endif /* L_INTERNAL_H_ */
49