lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 0c3ea96541525c5e347f1072ac2659f010e2ec34
parent babaa96eab3a5419889b393424db14377f581a69
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 11 Oct 2001 18:40:59 -0300

no more copytagmethod function

Diffstat:
Mlbaselib.c | 5-----
Mltm.c | 14--------------
Mlua.h | 4+---
3 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/lbaselib.c b/lbaselib.c @@ -198,10 +198,6 @@ static int luaB_newtype (lua_State *L) { 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) { 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("call"), luaB_call}, {l_s("collectgarbage"), luaB_collectgarbage}, - {l_s("copytagmethods"), luaB_copytagmethods}, {l_s("dofile"), luaB_dofile}, {l_s("dostring"), luaB_dostring}, {l_s("error"), luaB_error}, diff --git a/ltm.c b/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 t = ttype(o); switch (t) { diff --git a/lua.h b/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 ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: info@lua.org @@ -202,7 +202,6 @@ LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold); ** miscellaneous functions */ 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 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_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_istable(L,n) (lua_rawtag(L,n) == LUA_TTABLE)