mirror of
https://github.com/lua/lua.git
synced 2025-02-04 06:13:04 +08:00
details (to avoid too long strings in assertions)
This commit is contained in:
parent
0fac33da9e
commit
fa2ddb070a
8
ltests.c
8
ltests.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltests.c,v 2.102 2010/05/06 18:16:57 roberto Exp roberto $
|
** $Id: ltests.c,v 2.103 2010/05/07 18:09:23 roberto Exp roberto $
|
||||||
** Internal Module for Debugging of the Lua Implementation
|
** Internal Module for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -415,13 +415,13 @@ int lua_checkmemory (lua_State *L) {
|
|||||||
global_State *g = G(L);
|
global_State *g = G(L);
|
||||||
GCObject *o;
|
GCObject *o;
|
||||||
UpVal *uv;
|
UpVal *uv;
|
||||||
checkliveness(g, &g->l_registry);
|
|
||||||
checkstack(g, g->mainthread);
|
|
||||||
g->mainthread->marked = resetbit(g->mainthread->marked, TESTGRAYBIT);
|
|
||||||
if (keepinvariant(g)) {
|
if (keepinvariant(g)) {
|
||||||
lua_assert(!iswhite(obj2gco(g->mainthread)));
|
lua_assert(!iswhite(obj2gco(g->mainthread)));
|
||||||
lua_assert(!iswhite(gcvalue(&g->l_registry)));
|
lua_assert(!iswhite(gcvalue(&g->l_registry)));
|
||||||
}
|
}
|
||||||
|
lua_assert(!isdead(g, gcvalue(&g->l_registry)));
|
||||||
|
checkstack(g, g->mainthread);
|
||||||
|
g->mainthread->marked = resetbit(g->mainthread->marked, TESTGRAYBIT);
|
||||||
/* check 'allgc' list */
|
/* check 'allgc' list */
|
||||||
markgrays(g);
|
markgrays(g);
|
||||||
checkold(g, g->allgc);
|
checkold(g, g->allgc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user