diff options
-rw-r--r-- | ltests.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 1.17 2002/10/25 20:05:28 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 1.18 2002/11/12 14:34:18 roberto Exp roberto $ |
3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -43,7 +43,7 @@ void *debug_realloc (void *block, size_t oldsize, size_t size); | |||
43 | /* test for lock/unlock */ | 43 | /* test for lock/unlock */ |
44 | extern int islocked; | 44 | extern int islocked; |
45 | #define LUA_USERSTATE int * | 45 | #define LUA_USERSTATE int * |
46 | #define getlock(l) (*(cast(int **, l) - 1)) | 46 | #define getlock(l) (*(cast(LUA_USERSTATE *, l) - 1)) |
47 | #define lua_userstateopen(l) if (l != NULL) getlock(l) = &islocked; | 47 | #define lua_userstateopen(l) if (l != NULL) getlock(l) = &islocked; |
48 | #define lua_lock(l) lua_assert((*getlock(l))++ == 0) | 48 | #define lua_lock(l) lua_assert((*getlock(l))++ == 0) |
49 | #define lua_unlock(l) lua_assert(--(*getlock(l)) == 0) | 49 | #define lua_unlock(l) lua_assert(--(*getlock(l)) == 0) |