diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-01-22 15:40:00 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-01-22 15:40:00 -0200 |
commit | a19f9056f3194332b22fe9ae96cd7f24d39c7d82 (patch) | |
tree | e334ef64896c393d27a1bd11b1c4bc551ad488da /table.c | |
parent | 5b71ab780cbe225548c3a741434b60e26ecb26be (diff) | |
download | lua-a19f9056f3194332b22fe9ae96cd7f24d39c7d82.tar.gz lua-a19f9056f3194332b22fe9ae96cd7f24d39c7d82.tar.bz2 lua-a19f9056f3194332b22fe9ae96cd7f24d39c7d82.zip |
new function "tostring".
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 22 |
1 files changed, 12 insertions, 10 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.39 1996/01/09 20:23:19 roberto Exp $"; | 6 | char *rcs_table="$Id: table.c,v 2.40 1996/01/22 14:15:13 roberto Exp roberto $"; |
7 | 7 | ||
8 | /*#include <string.h>*/ | 8 | /*#include <string.h>*/ |
9 | 9 | ||
@@ -44,6 +44,14 @@ static void lua_initsymbol (void) | |||
44 | Word n; | 44 | Word n; |
45 | lua_maxsymbol = BUFFER_BLOCK; | 45 | lua_maxsymbol = BUFFER_BLOCK; |
46 | lua_table = newvector(lua_maxsymbol, Symbol); | 46 | lua_table = newvector(lua_maxsymbol, Symbol); |
47 | n = luaI_findsymbolbyname("nextvar"); | ||
48 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar; | ||
49 | n = luaI_findsymbolbyname("error"); | ||
50 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_error; | ||
51 | n = luaI_findsymbolbyname("tonumber"); | ||
52 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; | ||
53 | n = luaI_findsymbolbyname("setfallback"); | ||
54 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_setfallback; | ||
47 | n = luaI_findsymbolbyname("next"); | 55 | n = luaI_findsymbolbyname("next"); |
48 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next; | 56 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next; |
49 | n = luaI_findsymbolbyname("dofile"); | 57 | n = luaI_findsymbolbyname("dofile"); |
@@ -52,20 +60,14 @@ static void lua_initsymbol (void) | |||
52 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = setglobal; | 60 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = setglobal; |
53 | n = luaI_findsymbolbyname("getglobal"); | 61 | n = luaI_findsymbolbyname("getglobal"); |
54 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = getglobal; | 62 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = getglobal; |
55 | n = luaI_findsymbolbyname("nextvar"); | ||
56 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar; | ||
57 | n = luaI_findsymbolbyname("type"); | 63 | n = luaI_findsymbolbyname("type"); |
58 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type; | 64 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type; |
59 | n = luaI_findsymbolbyname("tonumber"); | 65 | n = luaI_findsymbolbyname("tostring"); |
60 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; | 66 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_tostring; |
61 | n = luaI_findsymbolbyname("print"); | 67 | n = luaI_findsymbolbyname("print"); |
62 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_print; | 68 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_print; |
63 | n = luaI_findsymbolbyname("dostring"); | 69 | n = luaI_findsymbolbyname("dostring"); |
64 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring; | 70 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring; |
65 | n = luaI_findsymbolbyname("setfallback"); | ||
66 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_setfallback; | ||
67 | n = luaI_findsymbolbyname("error"); | ||
68 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_error; | ||
69 | } | 71 | } |
70 | 72 | ||
71 | 73 | ||