no more copytagmethod function
This commit is contained in:
@@ -198,10 +198,6 @@ static int luaB_newtype (lua_State *L) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int luaB_copytagmethods (lua_State *L) {
|
|
||||||
lua_pushnumber(L, lua_copytagmethods(L, gettag(L, 1), gettag(L, 2)));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int luaB_globals (lua_State *L) {
|
static int luaB_globals (lua_State *L) {
|
||||||
lua_getglobals(L); /* value to be returned */
|
lua_getglobals(L); /* value to be returned */
|
||||||
@@ -697,7 +693,6 @@ static const luaL_reg base_funcs[] = {
|
|||||||
{l_s(LUA_ERRORMESSAGE), luaB__ERRORMESSAGE},
|
{l_s(LUA_ERRORMESSAGE), luaB__ERRORMESSAGE},
|
||||||
{l_s("call"), luaB_call},
|
{l_s("call"), luaB_call},
|
||||||
{l_s("collectgarbage"), luaB_collectgarbage},
|
{l_s("collectgarbage"), luaB_collectgarbage},
|
||||||
{l_s("copytagmethods"), luaB_copytagmethods},
|
|
||||||
{l_s("dofile"), luaB_dofile},
|
{l_s("dofile"), luaB_dofile},
|
||||||
{l_s("dostring"), luaB_dostring},
|
{l_s("dostring"), luaB_dostring},
|
||||||
{l_s("error"), luaB_error},
|
{l_s("error"), luaB_error},
|
||||||
|
|||||||
14
ltm.c
14
ltm.c
@@ -108,20 +108,6 @@ static void checktag (lua_State *L, int tag) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom) {
|
|
||||||
int e;
|
|
||||||
lua_lock(L);
|
|
||||||
checktag(L, tagto);
|
|
||||||
checktag(L, tagfrom);
|
|
||||||
for (e=0; e<TM_N; e++) {
|
|
||||||
if (luaT_validevent(tagto, e))
|
|
||||||
luaT_gettm(G(L), tagto, e) = luaT_gettm(G(L), tagfrom, e);
|
|
||||||
}
|
|
||||||
lua_unlock(L);
|
|
||||||
return tagto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int luaT_tag (const TObject *o) {
|
int luaT_tag (const TObject *o) {
|
||||||
int t = ttype(o);
|
int t = ttype(o);
|
||||||
switch (t) {
|
switch (t) {
|
||||||
|
|||||||
4
lua.h
4
lua.h
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.h,v 1.102 2001/07/19 13:24:18 roberto Exp roberto $
|
** $Id: lua.h,v 1.103 2001/08/31 19:46:07 roberto Exp $
|
||||||
** Lua - An Extensible Extension Language
|
** Lua - An Extensible Extension Language
|
||||||
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
||||||
** e-mail: info@lua.org
|
** e-mail: info@lua.org
|
||||||
@@ -202,7 +202,6 @@ LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold);
|
|||||||
** miscellaneous functions
|
** miscellaneous functions
|
||||||
*/
|
*/
|
||||||
LUA_API int lua_newtype (lua_State *L, const lua_char *name, int basictype);
|
LUA_API int lua_newtype (lua_State *L, const lua_char *name, int basictype);
|
||||||
LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom);
|
|
||||||
LUA_API void lua_settag (lua_State *L, int tag);
|
LUA_API void lua_settag (lua_State *L, int tag);
|
||||||
|
|
||||||
LUA_API int lua_name2tag (lua_State *L, const lua_char *name);
|
LUA_API int lua_name2tag (lua_State *L, const lua_char *name);
|
||||||
@@ -237,7 +236,6 @@ LUA_API int lua_getweakmode (lua_State *L, int index);
|
|||||||
|
|
||||||
#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
|
#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
|
||||||
#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0)
|
#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0)
|
||||||
#define lua_clonetag(L,t) lua_copytagmethods(L, lua_newtag(L), (t))
|
|
||||||
|
|
||||||
#define lua_isfunction(L,n) (lua_rawtag(L,n) == LUA_TFUNCTION)
|
#define lua_isfunction(L,n) (lua_rawtag(L,n) == LUA_TFUNCTION)
|
||||||
#define lua_istable(L,n) (lua_rawtag(L,n) == LUA_TTABLE)
|
#define lua_istable(L,n) (lua_rawtag(L,n) == LUA_TTABLE)
|
||||||
|
|||||||
Reference in New Issue
Block a user