aboutsummaryrefslogtreecommitdiff
path: root/src/lj_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_api.c')
-rw-r--r--src/lj_api.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index 451e4444..0b7855d7 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -546,17 +546,7 @@ LUA_API lua_State *lua_tothread(lua_State *L, int idx)
546 546
547LUA_API const void *lua_topointer(lua_State *L, int idx) 547LUA_API const void *lua_topointer(lua_State *L, int idx)
548{ 548{
549 cTValue *o = index2adr(L, idx); 549 return lj_obj_ptr(index2adr(L, idx));
550 if (tvisudata(o))
551 return uddata(udataV(o));
552 else if (tvislightud(o))
553 return lightudV(o);
554 else if (tviscdata(o))
555 return cdataptr(cdataV(o));
556 else if (tvisgcv(o))
557 return gcV(o);
558 else
559 return NULL;
560} 550}
561 551
562/* -- Stack setters (object creation) ------------------------------------- */ 552/* -- Stack setters (object creation) ------------------------------------- */