diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-05-01 15:21:32 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-05-01 15:21:32 -0300 |
commit | 4fe11ae232e37045feaaf08d72a5414fca463c1c (patch) | |
tree | 1bf874a3d69e296effa2a41b488f2644238d8277 /lapi.c | |
parent | c549d4fe64c48ab645740e6d12c69c91250fad3d (diff) | |
download | lua-4fe11ae232e37045feaaf08d72a5414fca463c1c.tar.gz lua-4fe11ae232e37045feaaf08d72a5414fca463c1c.tar.bz2 lua-4fe11ae232e37045feaaf08d72a5414fca463c1c.zip |
'lua_getuservalue' returns type of user value
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.207 2014/04/30 16:48:44 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.208 2014/05/01 18:18:06 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 | */ |
@@ -735,7 +735,7 @@ LUA_API int lua_getmetatable (lua_State *L, int objindex) { | |||
735 | } | 735 | } |
736 | 736 | ||
737 | 737 | ||
738 | LUA_API void lua_getuservalue (lua_State *L, int idx) { | 738 | LUA_API int lua_getuservalue (lua_State *L, int idx) { |
739 | StkId o; | 739 | StkId o; |
740 | lua_lock(L); | 740 | lua_lock(L); |
741 | o = index2addr(L, idx); | 741 | o = index2addr(L, idx); |
@@ -743,6 +743,7 @@ LUA_API void lua_getuservalue (lua_State *L, int idx) { | |||
743 | getuservalue(L, rawuvalue(o), L->top); | 743 | getuservalue(L, rawuvalue(o), L->top); |
744 | api_incr_top(L); | 744 | api_incr_top(L); |
745 | lua_unlock(L); | 745 | lua_unlock(L); |
746 | return ttnov(L->top - 1); | ||
746 | } | 747 | } |
747 | 748 | ||
748 | 749 | ||