diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-04 15:20:00 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-04 15:20:00 -0200 |
commit | 8c22057b2ece906d3877363573db39e65de1b1b6 (patch) | |
tree | 248261300a1fc683ae4a656d3ca53cc3c11fffcf /table.c | |
parent | 253655ae4b988f93ddfd1e7e06a50a0d57ea1978 (diff) | |
download | lua-8c22057b2ece906d3877363573db39e65de1b1b6.tar.gz lua-8c22057b2ece906d3877363573db39e65de1b1b6.tar.bz2 lua-8c22057b2ece906d3877363573db39e65de1b1b6.zip |
new global function 'setfallback'
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 12 |
1 files changed, 7 insertions, 5 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.9 1994/11/03 21:48:36 roberto Exp $"; | 6 | char *rcs_table="$Id: table.c,v 2.10 1994/11/03 22:33:40 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -53,20 +53,22 @@ static void lua_initsymbol (void) | |||
53 | lua_error ("symbol table: not enough memory"); | 53 | lua_error ("symbol table: not enough memory"); |
54 | return; | 54 | return; |
55 | } | 55 | } |
56 | n = lua_findsymbol("type"); | ||
57 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type; | ||
58 | n = lua_findsymbol("tonumber"); | ||
59 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; | ||
60 | n = lua_findsymbol("next"); | 56 | n = lua_findsymbol("next"); |
61 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next; | 57 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next; |
62 | n = lua_findsymbol("nextvar"); | 58 | n = lua_findsymbol("nextvar"); |
63 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar; | 59 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar; |
60 | n = lua_findsymbol("type"); | ||
61 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type; | ||
62 | n = lua_findsymbol("tonumber"); | ||
63 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; | ||
64 | n = lua_findsymbol("print"); | 64 | n = lua_findsymbol("print"); |
65 | s_tag(n) = LUA_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) = LUA_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) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring; | 69 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring; |
70 | n = lua_findsymbol("setfallback"); | ||
71 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_setfallback; | ||
70 | } | 72 | } |
71 | 73 | ||
72 | 74 | ||