summaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-06-02 16:09:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-06-02 16:09:21 -0300
commitba9878fcb8ea64bf582c561ed0f472fd6fd0d850 (patch)
tree197598dbd448481673666ec65ceb47655e24342e /ltests.h
parentfa38421cea9f92e643e7598fa5ea6f6efc3e53ee (diff)
downloadlua-github-ba9878fcb8ea64bf582c561ed0f472fd6fd0d850.tar.gz
lock stuff defined in `luaconf.h'
Diffstat (limited to 'ltests.h')
-rw-r--r--ltests.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/ltests.h b/ltests.h
index 5ae9cb8e..0f754917 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
/*
-** $Id: ltests.h,v 2.4 2004/04/30 20:13:38 roberto Exp roberto $
+** $Id: ltests.h,v 2.5 2004/05/03 12:28:43 roberto Exp roberto $
** Internal Header for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -55,10 +55,14 @@ int lua_checkmemory (lua_State *L);
/* test for lock/unlock */
+#undef lua_userstateopen
+#undef lua_lock
+#undef lua_unlock
+
extern int islocked;
#define LUA_USERSTATE int *
#define getlock(l) (*(cast(LUA_USERSTATE *, l) - 1))
-#define lua_userstateopen(l) if (l != NULL) getlock(l) = &islocked;
+#define lua_userstateopen(l) getlock(l) = &islocked;
#define lua_lock(l) lua_assert((*getlock(l))++ == 0)
#define lua_unlock(l) lua_assert(--(*getlock(l)) == 0)