diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-19 15:42:32 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-19 15:42:32 -0200 |
commit | 48e42261ac5be367c90d8079da3371509b5c325a (patch) | |
tree | ba2d405bc15f8c29e2dfb8a6ab31d84fc0daa093 | |
parent | be762f38bd8484514417c9d1feff8ce678e86ef9 (diff) | |
download | lua-48e42261ac5be367c90d8079da3371509b5c325a.tar.gz lua-48e42261ac5be367c90d8079da3371509b5c325a.tar.bz2 lua-48e42261ac5be367c90d8079da3371509b5c325a.zip |
details
-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) |