diff options
Diffstat (limited to 'src/tools.h')
-rw-r--r-- | src/tools.h | 12 |
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; | |||
83 | void luaG_dump( lua_State* L ); | 84 | void luaG_dump( lua_State* L ); |
84 | 85 | ||
85 | lua_State* luaG_newstate( lua_State* _from, int const _on_state_create, char const* libs); | 86 | lua_State* luaG_newstate( lua_State* _from, int const _on_state_create, char const* libs); |
87 | void luaG_copy_one_time_settings( lua_State* L, lua_State* L2, char const* name_); | ||
86 | 88 | ||
87 | typedef struct { | 89 | typedef 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 |
118 | extern bool_t GVerboseErrors; | 120 | extern bool_t GVerboseErrors; |
119 | 121 | ||
120 | #endif | 122 | char const* const CONFIG_REGKEY; |
121 | // TOOLS_H | 123 | char const* const LOOKUP_REGKEY; |
124 | |||
125 | #endif // TOOLS_H | ||