support for strings with '\0'

This commit is contained in:
Roberto Ierusalimschy
1998-03-06 13:54:42 -03:00
parent 5ef1989c4b
commit 88a2023c32
14 changed files with 238 additions and 158 deletions

6
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 1.15 1998/01/09 14:44:55 roberto Exp roberto $
** $Id: lgc.c,v 1.16 1998/01/19 19:49:22 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -213,8 +213,8 @@ static void globalmark (void)
{
TaggedString *g;
for (g=(TaggedString *)L->rootglobal.next; g; g=(TaggedString *)g->head.next)
if (g->u.globalval.ttype != LUA_T_NIL) {
markobject(&g->u.globalval);
if (g->u.s.globalval.ttype != LUA_T_NIL) {
markobject(&g->u.s.globalval);
strmark(g); /* cannot collect non nil global variables */
}
}