From 42ef3f938876088a1c28afd3f7e7b25273f1c976 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 3 Nov 1994 20:33:40 -0200 Subject: there is no need of predefined constants. --- table.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/table.c b/table.c index 26149d1a..1f7dad0b 100644 --- a/table.c +++ b/table.c @@ -3,7 +3,7 @@ ** Module to control static tables */ -char *rcs_table="$Id: table.c,v 2.8 1994/11/02 20:29:09 roberto Exp roberto $"; +char *rcs_table="$Id: table.c,v 2.9 1994/11/03 21:48:36 roberto Exp $"; #include #include @@ -54,7 +54,7 @@ static void lua_initsymbol (void) return; } n = lua_findsymbol("type"); - s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_type; + s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_type; n = lua_findsymbol("tonumber"); s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_obj2number; n = lua_findsymbol("next"); @@ -78,20 +78,10 @@ void lua_initconstant (void) lua_maxconstant = BUFFER_BLOCK; lua_constant = (char **) calloc(lua_maxconstant, sizeof(char *)); if (lua_constant == NULL) - { - lua_error ("constant table: not enough memory"); - return; - } - lua_findconstant("mark"); - lua_findconstant("nil"); - lua_findconstant("number"); - lua_findconstant("string"); - lua_findconstant("table"); - lua_findconstant("function"); - lua_findconstant("cfunction"); - lua_findconstant("userdata"); + lua_error ("constant table: not enough memory"); } + /* ** Given a name, search it at symbol table and return its index. If not ** found, allocate it. -- cgit v1.2.3-55-g6feb