diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-12-04 10:15:22 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-12-04 10:15:22 -0200 |
commit | cac1ebd1e06f5eb1e42141f006d360ae91f1f0f3 (patch) | |
tree | 6d3bf5302186f701e18c11ef08e42ff8bb6f08d6 | |
parent | 73c5515e0080037e9c5781338922a7afaa3bdcda (diff) | |
download | lua-cac1ebd1e06f5eb1e42141f006d360ae91f1f0f3.tar.gz lua-cac1ebd1e06f5eb1e42141f006d360ae91f1f0f3.tar.bz2 lua-cac1ebd1e06f5eb1e42141f006d360ae91f1f0f3.zip |
detail ('ttisuserdata' renamed to 'ttisfulluserdata')
-rw-r--r-- | lapi.c | 8 | ||||
-rw-r--r-- | lobject.h | 6 |
2 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.189 2013/09/11 20:15:31 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.190 2013/09/13 16:21:52 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -286,7 +286,7 @@ LUA_API int lua_isstring (lua_State *L, int idx) { | |||
286 | 286 | ||
287 | LUA_API int lua_isuserdata (lua_State *L, int idx) { | 287 | LUA_API int lua_isuserdata (lua_State *L, int idx) { |
288 | const TValue *o = index2addr(L, idx); | 288 | const TValue *o = index2addr(L, idx); |
289 | return (ttisuserdata(o) || ttislightuserdata(o)); | 289 | return (ttisfulluserdata(o) || ttislightuserdata(o)); |
290 | } | 290 | } |
291 | 291 | ||
292 | 292 | ||
@@ -740,7 +740,7 @@ LUA_API void lua_getuservalue (lua_State *L, int idx) { | |||
740 | StkId o; | 740 | StkId o; |
741 | lua_lock(L); | 741 | lua_lock(L); |
742 | o = index2addr(L, idx); | 742 | o = index2addr(L, idx); |
743 | api_check(L, ttisuserdata(o), "userdata expected"); | 743 | api_check(L, ttisfulluserdata(o), "full userdata expected"); |
744 | if (uvalue(o)->env) { | 744 | if (uvalue(o)->env) { |
745 | sethvalue(L, L->top, uvalue(o)->env); | 745 | sethvalue(L, L->top, uvalue(o)->env); |
746 | } else | 746 | } else |
@@ -879,7 +879,7 @@ LUA_API void lua_setuservalue (lua_State *L, int idx) { | |||
879 | lua_lock(L); | 879 | lua_lock(L); |
880 | api_checknelems(L, 1); | 880 | api_checknelems(L, 1); |
881 | o = index2addr(L, idx); | 881 | o = index2addr(L, idx); |
882 | api_check(L, ttisuserdata(o), "userdata expected"); | 882 | api_check(L, ttisfulluserdata(o), "full userdata expected"); |
883 | if (ttisnil(L->top - 1)) | 883 | if (ttisnil(L->top - 1)) |
884 | uvalue(o)->env = NULL; | 884 | uvalue(o)->env = NULL; |
885 | else { | 885 | else { |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.81 2013/08/27 18:53:35 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.82 2013/09/05 19:31:49 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -146,7 +146,7 @@ typedef struct lua_TValue TValue; | |||
146 | #define ttisCclosure(o) checktag((o), ctb(LUA_TCCL)) | 146 | #define ttisCclosure(o) checktag((o), ctb(LUA_TCCL)) |
147 | #define ttisLclosure(o) checktag((o), ctb(LUA_TLCL)) | 147 | #define ttisLclosure(o) checktag((o), ctb(LUA_TLCL)) |
148 | #define ttislcf(o) checktag((o), LUA_TLCF) | 148 | #define ttislcf(o) checktag((o), LUA_TLCF) |
149 | #define ttisuserdata(o) checktag((o), ctb(LUA_TUSERDATA)) | 149 | #define ttisfulluserdata(o) checktag((o), ctb(LUA_TUSERDATA)) |
150 | #define ttisthread(o) checktag((o), ctb(LUA_TTHREAD)) | 150 | #define ttisthread(o) checktag((o), ctb(LUA_TTHREAD)) |
151 | #define ttisdeadkey(o) checktag((o), LUA_TDEADKEY) | 151 | #define ttisdeadkey(o) checktag((o), LUA_TDEADKEY) |
152 | 152 | ||
@@ -158,7 +158,7 @@ typedef struct lua_TValue TValue; | |||
158 | #define pvalue(o) check_exp(ttislightuserdata(o), val_(o).p) | 158 | #define pvalue(o) check_exp(ttislightuserdata(o), val_(o).p) |
159 | #define rawtsvalue(o) check_exp(ttisstring(o), &val_(o).gc->ts) | 159 | #define rawtsvalue(o) check_exp(ttisstring(o), &val_(o).gc->ts) |
160 | #define tsvalue(o) (&rawtsvalue(o)->tsv) | 160 | #define tsvalue(o) (&rawtsvalue(o)->tsv) |
161 | #define rawuvalue(o) check_exp(ttisuserdata(o), &val_(o).gc->u) | 161 | #define rawuvalue(o) check_exp(ttisfulluserdata(o), &val_(o).gc->u) |
162 | #define uvalue(o) (&rawuvalue(o)->uv) | 162 | #define uvalue(o) (&rawuvalue(o)->uv) |
163 | #define clvalue(o) check_exp(ttisclosure(o), &val_(o).gc->cl) | 163 | #define clvalue(o) check_exp(ttisclosure(o), &val_(o).gc->cl) |
164 | #define clLvalue(o) check_exp(ttisLclosure(o), &val_(o).gc->cl.l) | 164 | #define clLvalue(o) check_exp(ttisLclosure(o), &val_(o).gc->cl.l) |