commit 42ef3f938876088a1c28afd3f7e7b25273f1c976
parent 2651afc455a78f5ae778b9fd8a0ee9efffed4998
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 3 Nov 1994 20:33:21 -0200
there is no need of predefined constants.
Diffstat:
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git 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 <stdlib.h>
#include <string.h>
@@ -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.