MCPcopy Index your code
hub / github.com/NetHack/NetHack / l_obj_getcontents

Function l_obj_getcontents

src/nhlobj.c:96–107  ·  view source on GitHub ↗

local o = obj.new("large chest"); local cobj = o:contents(); */

Source from the content-addressed store, hash-verified

94/* local o = obj.new("large chest");
95 local cobj = o:contents(); */
96staticfn int
97l_obj_getcontents(lua_State *L)
98{
99 struct _lua_obj *lo = l_obj_check(L, 1);
100 struct obj *obj = lo->obj;
101
102 if (!obj)
103 nhl_error(L, "l_obj_getcontents: no obj");
104
105 (void) l_obj_push(L, obj->cobj);
106 return 1;
107}
108
109/* Puts object inside another object. */
110/* local box = obj.new("large chest");

Callers

nothing calls this directly

Calls 3

l_obj_checkFunction · 0.85
nhl_errorFunction · 0.85
l_obj_pushFunction · 0.85

Tested by

no test coverage detected