From f823c6887e28c815234f8b4bd355887b4f554857 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Thu, 26 Sep 2013 21:11:24 +0200 Subject: Reduce memory footprint, simplify module order setup in conjuction with Lanes, and send over native functions a bit faster as well * Lanes no longer has to internally require modules inside the keeper states because they no longer need a lookup database. the lookup name is stored as-is and actually converted in the destination state * optimisation: bypass cache when sending native functions over * removed all the KEEPER_MODEL_LUA code, as it can no longer work anyway --- src/keeper.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/keeper.h') 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 void close_keepers( void); #endif // HAVE_KEEPER_ATEXIT_DESINIT -void populate_keepers( lua_State *L); struct s_Keeper *keeper_acquire( const void *ptr); void keeper_release( struct s_Keeper *K); void keeper_toggle_nil_sentinels( lua_State *L, int _val_i, int _nil_to_sentinel); int keeper_push_linda_storage( lua_State* L, void* ptr); -#define KEEPER_MODEL_LUA 1 -#define KEEPER_MODEL_C 2 -#define KEEPER_MODEL KEEPER_MODEL_C - -#if KEEPER_MODEL == KEEPER_MODEL_LUA -typedef char const* keeper_api_t; -#define KEEPER_API( _op) #_op -#define PUSH_KEEPER_FUNC( K, _api) lua_getglobal( K, _api) -#elif KEEPER_MODEL == KEEPER_MODEL_C typedef lua_CFunction keeper_api_t; #define KEEPER_API( _op) keepercall_ ## _op #define PUSH_KEEPER_FUNC lua_pushcfunction @@ -45,7 +35,6 @@ int keepercall_limit( lua_State* L); int keepercall_get( lua_State* L); int keepercall_set( lua_State* L); int keepercall_count( lua_State* L); -#endif // KEEPER_MODEL int keeper_call( lua_State *K, keeper_api_t _func, lua_State *L, void *linda, uint_t starting_index); -- cgit v1.2.3-55-g6feb