better way to traverse GCnode lists.

This commit is contained in:
Roberto Ierusalimschy
1997-09-26 13:46:20 -03:00
parent a580480b07
commit eb617df2d8
7 changed files with 40 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: $
** $Id: lobject.c,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
** Some generic functions over Lua objects
** See Copyright Notice in lua.h
*/
@@ -66,3 +66,12 @@ int luaO_findstring (char *name, char *list[])
return -1; /* name not found */
}
void luaO_insertlist (GCnode *root, GCnode *node)
{
++luaO_nentities;
node->next = root->next;
root->next = node;
node->marked = 0;
}