added check for conversion 'obj2gco' (and corrections for small

problems detected by this check)
This commit is contained in:
Roberto Ierusalimschy
2014-07-18 09:17:54 -03:00
parent 9aec500a26
commit 56137d58ff
10 changed files with 51 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstate.c,v 2.120 2014/02/18 13:39:37 roberto Exp roberto $
** $Id: lstate.c,v 2.121 2014/02/18 13:46:26 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -206,7 +206,7 @@ static void f_luaopen (lua_State *L, void *ud) {
luaX_init(L);
/* pre-create memory-error message */
g->memerrmsg = luaS_newliteral(L, MEMERRMSG);
luaC_fix(L, obj2gco(g->memerrmsg)); /* it should never be collected */
luaC_fix(L, ts2gco(g->memerrmsg)); /* it should never be collected */
g->gcrunning = 1; /* allow gc */
g->version = lua_version(NULL);
luai_userstateopen(L);