simplified version of `gc' tag method (only for userdata now).

This commit is contained in:
Roberto Ierusalimschy
1999-10-04 15:51:04 -02:00
parent 1f7103e05d
commit 4343420d4d
20 changed files with 384 additions and 443 deletions

15
ldo.c
View File

@@ -1,18 +1,16 @@
/*
** $Id: ldo.c,v 1.46 1999/08/16 20:52:00 roberto Exp roberto $
** $Id: ldo.c,v 1.47 1999/09/06 15:24:46 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lauxlib.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
@@ -219,17 +217,6 @@ void luaD_calln (int nArgs, int nResults) {
}
/*
** Traverse all objects on L->stack.stack
*/
void luaD_travstack (int (*fn)(TObject *)) {
StkId i;
for (i = (L->stack.top-1)-L->stack.stack; i>=0; i--)
fn(L->stack.stack+i);
}
static void message (const char *s) {
const TObject *em = &(luaS_new("_ERRORMESSAGE")->u.s.globalval);
if (ttype(em) == LUA_T_PROTO || ttype(em) == LUA_T_CPROTO ||