diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-10-04 15:51:04 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-10-04 15:51:04 -0200 |
| commit | 4343420d4d559a7d4cdacdbc1fd61552dcf59f04 (patch) | |
| tree | 57e0bdd41e2f3a4ab70d3150022569751e3d02ad /ldo.c | |
| parent | 1f7103e05d01a6a4c300a73bcfc8d9b17b2c20a4 (diff) | |
| download | lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.tar.gz lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.tar.bz2 lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.zip | |
simplified version of `gc' tag method (only for userdata now).
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 15 |
1 files changed, 1 insertions, 14 deletions
| @@ -1,18 +1,16 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.46 1999/08/16 20:52:00 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.47 1999/09/06 15:24:46 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdio.h> | ||
| 10 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| 11 | #include <string.h> | 10 | #include <string.h> |
| 12 | 11 | ||
| 13 | #include "lauxlib.h" | 12 | #include "lauxlib.h" |
| 14 | #include "ldo.h" | 13 | #include "ldo.h" |
| 15 | #include "lfunc.h" | ||
| 16 | #include "lgc.h" | 14 | #include "lgc.h" |
| 17 | #include "lmem.h" | 15 | #include "lmem.h" |
| 18 | #include "lobject.h" | 16 | #include "lobject.h" |
| @@ -219,17 +217,6 @@ void luaD_calln (int nArgs, int nResults) { | |||
| 219 | } | 217 | } |
| 220 | 218 | ||
| 221 | 219 | ||
| 222 | /* | ||
| 223 | ** Traverse all objects on L->stack.stack | ||
| 224 | */ | ||
| 225 | void luaD_travstack (int (*fn)(TObject *)) { | ||
| 226 | StkId i; | ||
| 227 | for (i = (L->stack.top-1)-L->stack.stack; i>=0; i--) | ||
| 228 | fn(L->stack.stack+i); | ||
| 229 | } | ||
| 230 | |||
| 231 | |||
| 232 | |||
| 233 | static void message (const char *s) { | 220 | static void message (const char *s) { |
| 234 | const TObject *em = &(luaS_new("_ERRORMESSAGE")->u.s.globalval); | 221 | const TObject *em = &(luaS_new("_ERRORMESSAGE")->u.s.globalval); |
| 235 | if (ttype(em) == LUA_T_PROTO || ttype(em) == LUA_T_CPROTO || | 222 | if (ttype(em) == LUA_T_PROTO || ttype(em) == LUA_T_CPROTO || |
