소스 검색

allow 'set' macros to be used when 'L' is not available (as it was
needed only for assertions)

Roberto Ierusalimschy 9 년 전
부모
커밋
ebb2afa54b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lobject.h

+ 2 - 2
lobject.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lobject.h,v 2.114 2015/09/17 15:51:05 roberto Exp roberto $
+** $Id: lobject.h,v 2.115 2015/10/28 17:28:40 roberto Exp roberto $
 ** Type definitions for Lua objects
 ** See Copyright Notice in lua.h
 */
@@ -189,7 +189,7 @@ typedef struct lua_TValue {
 
 #define checkliveness(L,obj) \
 	lua_longassert(!iscollectable(obj) || \
-			(righttt(obj) && !isdead(G(L),gcvalue(obj))))
+		(righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj)))))
 
 
 /* Macros to set values */