diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-02 18:29:09 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-02 18:29:09 -0200 |
commit | 0162decc58cca093a7deeec6651718a5d301468b (patch) | |
tree | 65656ec33befde71548383aa38d0df70009f2e17 /table.c | |
parent | ac68a3abc483cf1b1473fd35e00cc4f887baab92 (diff) | |
download | lua-0162decc58cca093a7deeec6651718a5d301468b.tar.gz lua-0162decc58cca093a7deeec6651718a5d301468b.tar.bz2 lua-0162decc58cca093a7deeec6651718a5d301468b.zip |
tags T_NIL, etc, changed to LUA_T_NIL, etc
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Module to control static tables | 3 | ** Module to control static tables |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_table="$Id: table.c,v 2.6 1994/10/18 18:34:47 roberto Exp $"; | 6 | char *rcs_table="$Id: table.c,v 2.7 1994/11/02 19:09:23 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -54,19 +54,19 @@ static void lua_initsymbol (void) | |||
54 | return; | 54 | return; |
55 | } | 55 | } |
56 | n = lua_findsymbol("type"); | 56 | n = lua_findsymbol("type"); |
57 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_type; | 57 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_type; |
58 | n = lua_findsymbol("tonumber"); | 58 | n = lua_findsymbol("tonumber"); |
59 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_obj2number; | 59 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; |
60 | n = lua_findsymbol("next"); | 60 | n = lua_findsymbol("next"); |
61 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_next; | 61 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next; |
62 | n = lua_findsymbol("nextvar"); | 62 | n = lua_findsymbol("nextvar"); |
63 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_nextvar; | 63 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar; |
64 | n = lua_findsymbol("print"); | 64 | n = lua_findsymbol("print"); |
65 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_print; | 65 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_print; |
66 | n = lua_findsymbol("dofile"); | 66 | n = lua_findsymbol("dofile"); |
67 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_internaldofile; | 67 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldofile; |
68 | n = lua_findsymbol("dostring"); | 68 | n = lua_findsymbol("dostring"); |
69 | s_tag(n) = T_CFUNCTION; s_fvalue(n) = lua_internaldostring; | 69 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring; |
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
@@ -126,7 +126,7 @@ int lua_findsymbol (char *s) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | indexstring(n) = lua_ntable; | 128 | indexstring(n) = lua_ntable; |
129 | s_tag(lua_ntable) = T_NIL; | 129 | s_tag(lua_ntable) = LUA_T_NIL; |
130 | lua_ntable++; | 130 | lua_ntable++; |
131 | } | 131 | } |
132 | return indexstring(n); | 132 | return indexstring(n); |
@@ -190,9 +190,9 @@ void lua_travsymbol (void (*fn)(Object *)) | |||
190 | */ | 190 | */ |
191 | void lua_markobject (Object *o) | 191 | void lua_markobject (Object *o) |
192 | { | 192 | { |
193 | if (tag(o) == T_STRING && indexstring(svalue(o)) == UNMARKED_STRING) | 193 | if (tag(o) == LUA_T_STRING && indexstring(svalue(o)) == UNMARKED_STRING) |
194 | indexstring(svalue(o)) = MARKED_STRING; | 194 | indexstring(svalue(o)) = MARKED_STRING; |
195 | else if (tag(o) == T_ARRAY) | 195 | else if (tag(o) == LUA_T_ARRAY) |
196 | lua_hashmark (avalue(o)); | 196 | lua_hashmark (avalue(o)); |
197 | } | 197 | } |
198 | 198 | ||
@@ -278,11 +278,11 @@ void lua_nextvar (void) | |||
278 | { lua_error ("too few arguments to function `nextvar'"); return; } | 278 | { lua_error ("too few arguments to function `nextvar'"); return; } |
279 | if (lua_getparam (2) != NULL) | 279 | if (lua_getparam (2) != NULL) |
280 | { lua_error ("too many arguments to function `nextvar'"); return; } | 280 | { lua_error ("too many arguments to function `nextvar'"); return; } |
281 | if (tag(o) == T_NIL) | 281 | if (tag(o) == LUA_T_NIL) |
282 | { | 282 | { |
283 | varname = 0; | 283 | varname = 0; |
284 | } | 284 | } |
285 | else if (tag(o) != T_STRING) | 285 | else if (tag(o) != LUA_T_STRING) |
286 | { | 286 | { |
287 | lua_error ("incorrect argument to function `nextvar'"); | 287 | lua_error ("incorrect argument to function `nextvar'"); |
288 | return; | 288 | return; |
@@ -300,7 +300,7 @@ void lua_nextvar (void) | |||
300 | else | 300 | else |
301 | { | 301 | { |
302 | Object name; | 302 | Object name; |
303 | tag(&name) = T_STRING; | 303 | tag(&name) = LUA_T_STRING; |
304 | svalue(&name) = next; | 304 | svalue(&name) = next; |
305 | if (lua_pushobject (&name)) return; | 305 | if (lua_pushobject (&name)) return; |
306 | if (lua_pushobject (&s_object(indexstring(next)))) return; | 306 | if (lua_pushobject (&s_object(indexstring(next)))) return; |