aboutsummaryrefslogtreecommitdiff
path: root/src/tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tools.h b/src/tools.h
index 1113131..6d3b3c7 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -56,7 +56,8 @@ extern int debugspew_indent_depth;
56 #define STACK_END(L,c) /*nothing*/ 56 #define STACK_END(L,c) /*nothing*/
57 #define STACK_DUMP(L) /*nothing*/ 57 #define STACK_DUMP(L) /*nothing*/
58#else 58#else
59 #define _ASSERT_L(lua,c) do { if (!(c)) luaL_error( lua, "ASSERT failed: %s:%d '%s'", __FILE__, __LINE__, #c ); } while( 0) 59 void ASSERT_IMPL( lua_State* L, bool_t cond_, char const* file_, int const line_, char const* text_);
60 #define _ASSERT_L(lua,c) ASSERT_IMPL( lua, (c) != 0, __FILE__, __LINE__, #c)
60 // 61 //
61 #define STACK_CHECK(L) { int const _oldtop_##L = lua_gettop( L) 62 #define STACK_CHECK(L) { int const _oldtop_##L = lua_gettop( L)
62 #define STACK_MID(L,change) \ 63 #define STACK_MID(L,change) \
@@ -75,7 +76,7 @@ extern int debugspew_indent_depth;
75 76
76#define STACK_GROW(L,n) do { if (!lua_checkstack(L,n)) luaL_error( L, "Cannot grow stack!" ); } while( 0) 77#define STACK_GROW(L,n) do { if (!lua_checkstack(L,n)) luaL_error( L, "Cannot grow stack!" ); } while( 0)
77 78
78#define LUAG_FUNC( func_name ) static int LG_##func_name( lua_State *L ) 79#define LUAG_FUNC( func_name ) static int LG_##func_name( lua_State* L)
79 80
80#define luaG_optunsigned(L,i,d) ((uint_t) luaL_optinteger(L,i,d)) 81#define luaG_optunsigned(L,i,d) ((uint_t) luaL_optinteger(L,i,d))
81#define luaG_tounsigned(L,i) ((uint_t) lua_tointeger(L,i)) 82#define luaG_tounsigned(L,i) ((uint_t) lua_tointeger(L,i))
@@ -83,6 +84,7 @@ extern int debugspew_indent_depth;
83void luaG_dump( lua_State* L ); 84void luaG_dump( lua_State* L );
84 85
85lua_State* luaG_newstate( lua_State* _from, int const _on_state_create, char const* libs); 86lua_State* luaG_newstate( lua_State* _from, int const _on_state_create, char const* libs);
87void luaG_copy_one_time_settings( lua_State* L, lua_State* L2, char const* name_);
86 88
87typedef struct { 89typedef struct {
88 volatile int refcount; 90 volatile int refcount;
@@ -117,5 +119,7 @@ extern MUTEX_T require_cs;
117// for verbose errors 119// for verbose errors
118extern bool_t GVerboseErrors; 120extern bool_t GVerboseErrors;
119 121
120#endif 122char const* const CONFIG_REGKEY;
121 // TOOLS_H 123char const* const LOOKUP_REGKEY;
124
125#endif // TOOLS_H