detail ('ttisuserdata' renamed to 'ttisfulluserdata')

This commit is contained in:
Roberto Ierusalimschy 2013-12-04 10:15:22 -02:00
parent 73c5515e00
commit cac1ebd1e0
2 changed files with 7 additions and 7 deletions

8
lapi.c
View File

@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 2.189 2013/09/11 20:15:31 roberto Exp roberto $
** $Id: lapi.c,v 2.190 2013/09/13 16:21:52 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@ -286,7 +286,7 @@ LUA_API int lua_isstring (lua_State *L, int idx) {
LUA_API int lua_isuserdata (lua_State *L, int idx) {
const TValue *o = index2addr(L, idx);
return (ttisuserdata(o) || ttislightuserdata(o));
return (ttisfulluserdata(o) || ttislightuserdata(o));
}
@ -740,7 +740,7 @@ LUA_API void lua_getuservalue (lua_State *L, int idx) {
StkId o;
lua_lock(L);
o = index2addr(L, idx);
api_check(L, ttisuserdata(o), "userdata expected");
api_check(L, ttisfulluserdata(o), "full userdata expected");
if (uvalue(o)->env) {
sethvalue(L, L->top, uvalue(o)->env);
} else
@ -879,7 +879,7 @@ LUA_API void lua_setuservalue (lua_State *L, int idx) {
lua_lock(L);
api_checknelems(L, 1);
o = index2addr(L, idx);
api_check(L, ttisuserdata(o), "userdata expected");
api_check(L, ttisfulluserdata(o), "full userdata expected");
if (ttisnil(L->top - 1))
uvalue(o)->env = NULL;
else {

View File

@ -1,5 +1,5 @@
/*
** $Id: lobject.h,v 2.81 2013/08/27 18:53:35 roberto Exp roberto $
** $Id: lobject.h,v 2.82 2013/09/05 19:31:49 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@ -146,7 +146,7 @@ typedef struct lua_TValue TValue;
#define ttisCclosure(o) checktag((o), ctb(LUA_TCCL))
#define ttisLclosure(o) checktag((o), ctb(LUA_TLCL))
#define ttislcf(o) checktag((o), LUA_TLCF)
#define ttisuserdata(o) checktag((o), ctb(LUA_TUSERDATA))
#define ttisfulluserdata(o) checktag((o), ctb(LUA_TUSERDATA))
#define ttisthread(o) checktag((o), ctb(LUA_TTHREAD))
#define ttisdeadkey(o) checktag((o), LUA_TDEADKEY)
@ -158,7 +158,7 @@ typedef struct lua_TValue TValue;
#define pvalue(o) check_exp(ttislightuserdata(o), val_(o).p)
#define rawtsvalue(o) check_exp(ttisstring(o), &val_(o).gc->ts)
#define tsvalue(o) (&rawtsvalue(o)->tsv)
#define rawuvalue(o) check_exp(ttisuserdata(o), &val_(o).gc->u)
#define rawuvalue(o) check_exp(ttisfulluserdata(o), &val_(o).gc->u)
#define uvalue(o) (&rawuvalue(o)->uv)
#define clvalue(o) check_exp(ttisclosure(o), &val_(o).gc->cl)
#define clLvalue(o) check_exp(ttisLclosure(o), &val_(o).gc->cl.l)