diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-10-24 15:17:24 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-10-24 15:17:24 -0200 |
commit | e78cf96c971234ea25e35a9672ef00ea389d843f (patch) | |
tree | 57dc00fb747c26730acb13a087afb9bc7dcd3216 /lobject.h | |
parent | 0cb38439560fc2b912d41d3116d2d74c030d13af (diff) | |
download | lua-e78cf96c971234ea25e35a9672ef00ea389d843f.tar.gz lua-e78cf96c971234ea25e35a9672ef00ea389d843f.tar.bz2 lua-e78cf96c971234ea25e35a9672ef00ea389d843f.zip |
first version of Cclosures.
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.5 1997/10/16 20:07:40 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.6 1997/10/23 16:26:37 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -39,12 +39,11 @@ typedef enum { | |||
39 | LUA_T_NUMBER = -1, /* fixed tag for numbers */ | 39 | LUA_T_NUMBER = -1, /* fixed tag for numbers */ |
40 | LUA_T_STRING = -2, /* fixed tag for strings */ | 40 | LUA_T_STRING = -2, /* fixed tag for strings */ |
41 | LUA_T_ARRAY = -3, /* tag default for tables (or arrays) */ | 41 | LUA_T_ARRAY = -3, /* tag default for tables (or arrays) */ |
42 | LUA_T_FUNCTION = -4, /* fixed tag for functions */ | 42 | LUA_T_PROTO = -4, /* fixed tag for functions */ |
43 | LUA_T_CFUNCTION= -5, /* fixed tag for Cfunctions */ | 43 | LUA_T_CPROTO = -5, /* fixed tag for Cfunctions */ |
44 | LUA_T_NIL = -6, /* last "pre-defined" tag */ | 44 | LUA_T_NIL = -6, /* last "pre-defined" tag */ |
45 | LUA_T_PROTO = -7, | 45 | LUA_T_FUNCTION = -7, |
46 | LUA_T_MARK = -8, | 46 | LUA_T_MARK = -8, |
47 | LUA_T_CMARK = -9, | ||
48 | LUA_T_LINE = -10 | 47 | LUA_T_LINE = -10 |
49 | } lua_Type; | 48 | } lua_Type; |
50 | 49 | ||
@@ -53,7 +52,7 @@ typedef enum { | |||
53 | 52 | ||
54 | 53 | ||
55 | typedef union { | 54 | typedef union { |
56 | lua_CFunction f; /* LUA_T_CFUNCTION, LUA_T_CMARK */ | 55 | lua_CFunction f; /* LUA_T_CPROTO */ |
57 | real n; /* LUA_T_NUMBER */ | 56 | real n; /* LUA_T_NUMBER */ |
58 | struct TaggedString *ts; /* LUA_T_STRING, LUA_T_USERDATA */ | 57 | struct TaggedString *ts; /* LUA_T_STRING, LUA_T_USERDATA */ |
59 | struct TProtoFunc *tf; /* LUA_T_PROTO */ | 58 | struct TProtoFunc *tf; /* LUA_T_PROTO */ |
@@ -132,6 +131,7 @@ typedef struct LocVar { | |||
132 | #define fvalue(o) ((o)->value.f) | 131 | #define fvalue(o) ((o)->value.f) |
133 | #define tfvalue(o) ((o)->value.tf) | 132 | #define tfvalue(o) ((o)->value.tf) |
134 | 133 | ||
134 | #define protovalue(o) (&(o)->value.cl->consts[0]) | ||
135 | 135 | ||
136 | /* | 136 | /* |
137 | ** Closures | 137 | ** Closures |