aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-11-19 15:42:32 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-11-19 15:42:32 -0200
commit48e42261ac5be367c90d8079da3371509b5c325a (patch)
treeba2d405bc15f8c29e2dfb8a6ab31d84fc0daa093
parentbe762f38bd8484514417c9d1feff8ce678e86ef9 (diff)
downloadlua-48e42261ac5be367c90d8079da3371509b5c325a.tar.gz
lua-48e42261ac5be367c90d8079da3371509b5c325a.tar.bz2
lua-48e42261ac5be367c90d8079da3371509b5c325a.zip
details
-rw-r--r--ltests.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltests.h b/ltests.h
index 5cca2584..4f61920a 100644
--- a/ltests.h
+++ b/ltests.h
@@ -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 */
44extern int islocked; 44extern 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)