aboutsummaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-18 15:55:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-18 15:55:45 -0300
commitd872090248f7c90ce8d19af4eda3c0a6727f1261 (patch)
tree056a5aae39cd0dde1afbb063a786090b5def488f /ltests.h
parentfb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d (diff)
downloadlua-d872090248f7c90ce8d19af4eda3c0a6727f1261.tar.gz
lua-d872090248f7c90ce8d19af4eda3c0a6727f1261.tar.bz2
lua-d872090248f7c90ce8d19af4eda3c0a6727f1261.zip
small errors in previous `ci' of luaconf.h.
Diffstat (limited to 'ltests.h')
-rw-r--r--ltests.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/ltests.h b/ltests.h
index 57fde1a7..ed762e36 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.h,v 2.10 2004/09/10 17:30:46 roberto Exp roberto $ 2** $Id: ltests.h,v 2.11 2005/01/10 16:31:30 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*/
@@ -51,14 +51,15 @@ int lua_checkmemory (lua_State *L);
51 51
52 52
53/* test for lock/unlock */ 53/* test for lock/unlock */
54#undef lua_userstateopen 54#undef luai_userstateopen
55#undef lua_lock 55#undef lua_lock
56#undef lua_unlock 56#undef lua_unlock
57#undef LUAI_EXTRASPACE
57 58
58extern int islocked; 59extern int islocked;
59#define LUA_USERSTATE int * 60#define LUAI_EXTRASPACE sizeof(double)
60#define getlock(l) (*(cast(LUA_USERSTATE *, l) - 1)) 61#define getlock(l) (*(cast(int **, l) - 1))
61#define lua_userstateopen(l) getlock(l) = &islocked; 62#define luai_userstateopen(l) getlock(l) = &islocked;
62#define lua_lock(l) lua_assert((*getlock(l))++ == 0) 63#define lua_lock(l) lua_assert((*getlock(l))++ == 0)
63#define lua_unlock(l) lua_assert(--(*getlock(l)) == 0) 64#define lua_unlock(l) lua_assert(--(*getlock(l)) == 0)
64 65