瀏覽代碼

lock stuff defined in `luaconf.h'

Roberto Ierusalimschy 21 年之前
父節點
當前提交
ba9878fcb8
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      ltests.h

+ 6 - 2
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
 ** Internal Header for Debugging of the Lua Implementation
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -55,10 +55,14 @@ int lua_checkmemory (lua_State *L);
 
 
 
 
 /* test for lock/unlock */
 /* test for lock/unlock */
+#undef lua_userstateopen
+#undef lua_lock
+#undef lua_unlock
+
 extern int islocked;
 extern int islocked;
 #define LUA_USERSTATE	int *
 #define LUA_USERSTATE	int *
 #define getlock(l)	(*(cast(LUA_USERSTATE *, l) - 1))
 #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_lock(l)     lua_assert((*getlock(l))++ == 0)
 #define lua_unlock(l)   lua_assert(--(*getlock(l)) == 0)
 #define lua_unlock(l)   lua_assert(--(*getlock(l)) == 0)