diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-09-07 14:39:10 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-09-07 14:39:10 -0300 |
| commit | abdbe883a86bbc7fbf1d1bfc50756e1b42fc45b5 (patch) | |
| tree | 051a7571c8acaf5451b5c9b7d67f1796a345c565 /lfunc.h | |
| parent | 4d0935ec0ffed827aade5594216fae15bed7c6b5 (diff) | |
| download | lua-abdbe883a86bbc7fbf1d1bfc50756e1b42fc45b5.tar.gz lua-abdbe883a86bbc7fbf1d1bfc50756e1b42fc45b5.tar.bz2 lua-abdbe883a86bbc7fbf1d1bfc50756e1b42fc45b5.zip | |
first implementation of unrestricted static scoping
Diffstat (limited to 'lfunc.h')
| -rw-r--r-- | lfunc.h | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.h,v 1.14 2000/12/28 12:55:41 roberto Exp roberto $ | 2 | ** $Id: lfunc.h,v 1.15 2001/02/23 17:17:25 roberto Exp $ |
| 3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -11,9 +11,16 @@ | |||
| 11 | #include "lobject.h" | 11 | #include "lobject.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | #define luaF_isclosed(c, i) (!((c)->u.l.isopen & (1 << (i)))) | ||
| 15 | #define luaF_openentry(c, i) ((c)->u.l.isopen |= (1 << (i))) | ||
| 16 | #define luaF_closeentry(c, i) ((c)->u.l.isopen &= ~(1 << (i))) | ||
| 17 | |||
| 14 | 18 | ||
| 15 | Proto *luaF_newproto (lua_State *L); | 19 | Proto *luaF_newproto (lua_State *L); |
| 16 | Closure *luaF_newclosure (lua_State *L, int nelems); | 20 | Closure *luaF_newCclosure (lua_State *L, int nelems); |
| 21 | Closure *luaF_newLclosure (lua_State *L, int nelems); | ||
| 22 | void luaF_LConlist (lua_State *L, Closure *cl); | ||
| 23 | void luaF_close (lua_State *L, StkId level); | ||
| 17 | void luaF_freeproto (lua_State *L, Proto *f); | 24 | void luaF_freeproto (lua_State *L, Proto *f); |
| 18 | void luaF_freeclosure (lua_State *L, Closure *c); | 25 | void luaF_freeclosure (lua_State *L, Closure *c); |
| 19 | 26 | ||
