mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
new global function 'setfallback'
This commit is contained in:
parent
253655ae4b
commit
8c22057b2e
12
table.c
12
table.c
@ -3,7 +3,7 @@
|
|||||||
** Module to control static tables
|
** Module to control static tables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_table="$Id: table.c,v 2.9 1994/11/03 21:48:36 roberto Exp $";
|
char *rcs_table="$Id: table.c,v 2.10 1994/11/03 22:33:40 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -53,20 +53,22 @@ static void lua_initsymbol (void)
|
|||||||
lua_error ("symbol table: not enough memory");
|
lua_error ("symbol table: not enough memory");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
n = lua_findsymbol("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");
|
n = lua_findsymbol("next");
|
||||||
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next;
|
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_next;
|
||||||
n = lua_findsymbol("nextvar");
|
n = lua_findsymbol("nextvar");
|
||||||
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar;
|
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_nextvar;
|
||||||
|
n = lua_findsymbol("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("print");
|
n = lua_findsymbol("print");
|
||||||
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_print;
|
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_print;
|
||||||
n = lua_findsymbol("dofile");
|
n = lua_findsymbol("dofile");
|
||||||
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldofile;
|
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldofile;
|
||||||
n = lua_findsymbol("dostring");
|
n = lua_findsymbol("dostring");
|
||||||
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring;
|
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = lua_internaldostring;
|
||||||
|
n = lua_findsymbol("setfallback");
|
||||||
|
s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = luaI_setfallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user