From a661736f7984292a41d71847de68590f6b8ca08a Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Sat, 12 Feb 2011 17:06:03 +0100 Subject: Changed idfunc signature and contract to clarify that fact it is not lua-callable and to be able to require the module it was exported from in the target lanes. --- src/tools.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/tools.h') diff --git a/src/tools.h b/src/tools.h index aad26df..05bee59 100644 --- a/src/tools.h +++ b/src/tools.h @@ -48,19 +48,21 @@ #define luaG_typename( L, index ) lua_typename( L, lua_type(L,index) ) +typedef void (*luaG_IdFunction)( lua_State *L, char const * const which); + void luaG_dump( lua_State* L ); const char *luaG_openlibs( lua_State *L, const char *libs ); -int luaG_deep_userdata( lua_State *L ); -void *luaG_todeep( lua_State *L, lua_CFunction idfunc, int index ); +int luaG_deep_userdata( lua_State *L, luaG_IdFunction idfunc); +void *luaG_todeep( lua_State *L, luaG_IdFunction idfunc, int index ); typedef struct { volatile int refcount; void *deep; } DEEP_PRELUDE; -void luaG_push_proxy( lua_State *L, lua_CFunction idfunc, DEEP_PRELUDE *deep_userdata ); +void luaG_push_proxy( lua_State *L, luaG_IdFunction idfunc, DEEP_PRELUDE *deep_userdata ); void luaG_inter_copy( lua_State *L, lua_State *L2, uint_t n ); void luaG_inter_move( lua_State *L, lua_State *L2, uint_t n ); -- cgit v1.2.3-55-g6feb