aboutsummaryrefslogtreecommitdiff
path: root/src/keeper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keeper.h')
-rw-r--r--src/keeper.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/keeper.h b/src/keeper.h
index 29a19a9..420eca1 100644
--- a/src/keeper.h
+++ b/src/keeper.h
@@ -18,21 +18,11 @@ char const* init_keepers( lua_State* L, int _on_state_create, int const _nbKeepe
18void close_keepers( void); 18void close_keepers( void);
19#endif // HAVE_KEEPER_ATEXIT_DESINIT 19#endif // HAVE_KEEPER_ATEXIT_DESINIT
20 20
21void populate_keepers( lua_State *L);
22struct s_Keeper *keeper_acquire( const void *ptr); 21struct s_Keeper *keeper_acquire( const void *ptr);
23void keeper_release( struct s_Keeper *K); 22void keeper_release( struct s_Keeper *K);
24void keeper_toggle_nil_sentinels( lua_State *L, int _val_i, int _nil_to_sentinel); 23void keeper_toggle_nil_sentinels( lua_State *L, int _val_i, int _nil_to_sentinel);
25int keeper_push_linda_storage( lua_State* L, void* ptr); 24int keeper_push_linda_storage( lua_State* L, void* ptr);
26 25
27#define KEEPER_MODEL_LUA 1
28#define KEEPER_MODEL_C 2
29#define KEEPER_MODEL KEEPER_MODEL_C
30
31#if KEEPER_MODEL == KEEPER_MODEL_LUA
32typedef char const* keeper_api_t;
33#define KEEPER_API( _op) #_op
34#define PUSH_KEEPER_FUNC( K, _api) lua_getglobal( K, _api)
35#elif KEEPER_MODEL == KEEPER_MODEL_C
36typedef lua_CFunction keeper_api_t; 26typedef lua_CFunction keeper_api_t;
37#define KEEPER_API( _op) keepercall_ ## _op 27#define KEEPER_API( _op) keepercall_ ## _op
38#define PUSH_KEEPER_FUNC lua_pushcfunction 28#define PUSH_KEEPER_FUNC lua_pushcfunction
@@ -45,7 +35,6 @@ int keepercall_limit( lua_State* L);
45int keepercall_get( lua_State* L); 35int keepercall_get( lua_State* L);
46int keepercall_set( lua_State* L); 36int keepercall_set( lua_State* L);
47int keepercall_count( lua_State* L); 37int keepercall_count( lua_State* L);
48#endif // KEEPER_MODEL
49 38
50int keeper_call( lua_State *K, keeper_api_t _func, lua_State *L, void *linda, uint_t starting_index); 39int keeper_call( lua_State *K, keeper_api_t _func, lua_State *L, void *linda, uint_t starting_index);
51 40