lua

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

commit 8f8665fffad817d764ce03a53385f2ee08cb0a91
parent 49c1607157560f0775f3c697cca47b06978cc3e5
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri, 12 Apr 2013 16:06:44 -0300

'ttypenv' -> 'ttnov'

Diffstat:
Mlapi.c | 16++++++++--------
Mldump.c | 6+++---
Mlobject.h | 6+++---
Mltm.c | 6+++---
Mltm.h | 4++--
Mlvm.c | 4++--
6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lapi.c b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.170 2012/12/05 19:49:55 roberto Exp roberto $ +** $Id: lapi.c,v 2.171 2013/03/16 21:10:18 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -248,7 +248,7 @@ LUA_API void lua_pushvalue (lua_State *L, int idx) { LUA_API int lua_type (lua_State *L, int idx) { StkId o = index2addr(L, idx); - return (isvalid(o) ? ttypenv(o) : LUA_TNONE); + return (isvalid(o) ? ttnov(o) : LUA_TNONE); } @@ -406,7 +406,7 @@ LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) { LUA_API size_t lua_rawlen (lua_State *L, int idx) { StkId o = index2addr(L, idx); - switch (ttypenv(o)) { + switch (ttnov(o)) { case LUA_TSTRING: return tsvalue(o)->len; case LUA_TUSERDATA: return uvalue(o)->len; case LUA_TTABLE: return luaH_getn(hvalue(o)); @@ -426,7 +426,7 @@ LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) { LUA_API void *lua_touserdata (lua_State *L, int idx) { StkId o = index2addr(L, idx); - switch (ttypenv(o)) { + switch (ttnov(o)) { case LUA_TUSERDATA: return (rawuvalue(o) + 1); case LUA_TLIGHTUSERDATA: return pvalue(o); default: return NULL; @@ -689,7 +689,7 @@ LUA_API int lua_getmetatable (lua_State *L, int objindex) { int res; lua_lock(L); obj = index2addr(L, objindex); - switch (ttypenv(obj)) { + switch (ttnov(obj)) { case LUA_TTABLE: mt = hvalue(obj)->metatable; break; @@ -697,7 +697,7 @@ LUA_API int lua_getmetatable (lua_State *L, int objindex) { mt = uvalue(obj)->metatable; break; default: - mt = G(L)->mt[ttypenv(obj)]; + mt = G(L)->mt[ttnov(obj)]; break; } if (mt == NULL) @@ -821,7 +821,7 @@ LUA_API int lua_setmetatable (lua_State *L, int objindex) { api_check(L, ttistable(L->top - 1), "table expected"); mt = hvalue(L->top - 1); } - switch (ttypenv(obj)) { + switch (ttnov(obj)) { case LUA_TTABLE: { hvalue(obj)->metatable = mt; if (mt) { @@ -839,7 +839,7 @@ LUA_API int lua_setmetatable (lua_State *L, int objindex) { break; } default: { - G(L)->mt[ttypenv(obj)] = mt; + G(L)->mt[ttnov(obj)] = mt; break; } } diff --git a/ldump.c b/ldump.c @@ -1,5 +1,5 @@ /* -** $Id: ldump.c,v 2.16 2011/11/24 13:25:41 roberto Exp roberto $ +** $Id: ldump.c,v 2.17 2012/01/23 23:02:10 roberto Exp roberto $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -84,8 +84,8 @@ static void DumpConstants(const Proto* f, DumpState* D) for (i=0; i<n; i++) { const TValue* o=&f->k[i]; - DumpChar(ttypenv(o),D); - switch (ttypenv(o)) + DumpChar(ttnov(o),D); + switch (ttnov(o)) { case LUA_TNIL: break; diff --git a/lobject.h b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 2.70 2012/05/11 14:10:50 roberto Exp roberto $ +** $Id: lobject.h,v 2.71 2012/09/11 18:21:44 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -124,12 +124,12 @@ typedef struct lua_TValue TValue; #define ttype(o) (rttype(o) & 0x3F) /* type tag of a TValue with no variants (bits 0-3) */ -#define ttypenv(o) (novariant(rttype(o))) +#define ttnov(o) (novariant(rttype(o))) /* Macros to test type */ #define checktag(o,t) (rttype(o) == (t)) -#define checktype(o,t) (ttypenv(o) == (t)) +#define checktype(o,t) (ttnov(o) == (t)) #define ttisnumber(o) checktag((o), LUA_TNUMBER) #define ttisnil(o) checktag((o), LUA_TNIL) #define ttisboolean(o) checktag((o), LUA_TBOOLEAN) diff --git a/ltm.c b/ltm.c @@ -1,5 +1,5 @@ /* -** $Id: ltm.c,v 2.13 2011/02/28 17:32:10 roberto Exp roberto $ +** $Id: ltm.c,v 2.14 2011/06/02 19:31:40 roberto Exp roberto $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -62,7 +62,7 @@ const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { Table *mt; - switch (ttypenv(o)) { + switch (ttnov(o)) { case LUA_TTABLE: mt = hvalue(o)->metatable; break; @@ -70,7 +70,7 @@ const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { mt = uvalue(o)->metatable; break; default: - mt = G(L)->mt[ttypenv(o)]; + mt = G(L)->mt[ttnov(o)]; } return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); } diff --git a/ltm.h b/ltm.h @@ -1,5 +1,5 @@ /* -** $Id: ltm.h,v 2.10 2010/04/13 20:48:12 roberto Exp roberto $ +** $Id: ltm.h,v 2.11 2011/02/28 17:32:10 roberto Exp roberto $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -44,7 +44,7 @@ typedef enum { #define fasttm(l,et,e) gfasttm(G(l), et, e) #define ttypename(x) luaT_typenames_[(x) + 1] -#define objtypename(x) ttypename(ttypenv(x)) +#define objtypename(x) ttypename(ttnov(x)) LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; diff --git a/lvm.c b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.154 2012/08/16 17:34:28 roberto Exp roberto $ +** $Id: lvm.c,v 2.155 2013/03/16 21:10:18 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -334,7 +334,7 @@ void luaV_concat (lua_State *L, int total) { void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) { const TValue *tm; - switch (ttypenv(rb)) { + switch (ttnov(rb)) { case LUA_TTABLE: { Table *h = hvalue(rb); tm = fasttm(L, h->metatable, TM_LEN);