diff options
Diffstat (limited to 'src/deep.h')
-rw-r--r-- | src/deep.h | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -1,27 +1,25 @@ | |||
1 | #ifndef __LANES_DEEP_H__ | 1 | #pragma once |
2 | #define __LANES_DEEP_H__ 1 | ||
3 | 2 | ||
4 | /* | 3 | /* |
5 | * public 'deep' API to be used by external modules if they want to implement Lanes-aware userdata | 4 | * public 'deep' API to be used by external modules if they want to implement Lanes-aware userdata |
6 | * said modules will have to link against lanes (it is not really possible to separate the 'deep userdata' implementation from the rest of Lanes) | 5 | * said modules will have to link against lanes (it is not really possible to separate the 'deep userdata' implementation from the rest of Lanes) |
7 | */ | 6 | */ |
8 | 7 | ||
8 | #ifdef __cplusplus | ||
9 | extern "C" { | ||
10 | #endif // __cplusplus | ||
9 | #include "lua.h" | 11 | #include "lua.h" |
10 | #include "platform.h" | 12 | #ifdef __cplusplus |
13 | } | ||
14 | #endif // __cplusplus | ||
15 | |||
16 | #include "lanesconf.h" | ||
11 | #include "uniquekey.h" | 17 | #include "uniquekey.h" |
12 | 18 | ||
13 | // forwards | 19 | // forwards |
14 | struct s_Universe; | 20 | struct s_Universe; |
15 | typedef struct s_Universe Universe; | 21 | typedef struct s_Universe Universe; |
16 | 22 | ||
17 | #if !defined LANES_API // when deep is compiled standalone outside Lanes | ||
18 | #if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) | ||
19 | #define LANES_API __declspec(dllexport) | ||
20 | #else | ||
21 | #define LANES_API | ||
22 | #endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) | ||
23 | #endif // LANES_API | ||
24 | |||
25 | enum eLookupMode | 23 | enum eLookupMode |
26 | { | 24 | { |
27 | eLM_LaneBody, // send the lane body directly from the source to the destination lane | 25 | eLM_LaneBody, // send the lane body directly from the source to the destination lane |
@@ -60,7 +58,5 @@ typedef struct s_DeepPrelude DeepPrelude; | |||
60 | char const* push_deep_proxy( Universe* U, lua_State* L, DeepPrelude* prelude, int nuv_, LookupMode mode_); | 58 | char const* push_deep_proxy( Universe* U, lua_State* L, DeepPrelude* prelude, int nuv_, LookupMode mode_); |
61 | void free_deep_prelude( lua_State* L, DeepPrelude* prelude_); | 59 | void free_deep_prelude( lua_State* L, DeepPrelude* prelude_); |
62 | 60 | ||
63 | extern LANES_API int luaG_newdeepuserdata( lua_State* L, luaG_IdFunction idfunc, int nuv_); | 61 | LANES_API int luaG_newdeepuserdata( lua_State* L, luaG_IdFunction idfunc, int nuv_); |
64 | extern LANES_API void* luaG_todeep( lua_State* L, luaG_IdFunction idfunc, int index); | 62 | LANES_API void* luaG_todeep( lua_State* L, luaG_IdFunction idfunc, int index); |
65 | |||
66 | #endif // __LANES_DEEP_H__ | ||