MCPcopy Create free account
hub / github.com/NetHack/NetHack / l_obj_push

Function l_obj_push

src/nhlobj.c:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72staticfn struct _lua_obj *
73l_obj_push(lua_State *L, struct obj *otmp)
74{
75 struct _lua_obj *lo
76 = (struct _lua_obj *) lua_newuserdata(L, sizeof (struct _lua_obj));
77 luaL_getmetatable(L, "obj");
78 lua_setmetatable(L, -2);
79
80 lo->state = 0;
81 lo->obj = otmp;
82 if (otmp)
83 otmp->lua_ref_cnt++;
84
85 return lo;
86}
87
88void
89nhl_push_obj(lua_State *L, struct obj *otmp)

Callers 6

nhl_push_objFunction · 0.85
l_obj_getcontentsFunction · 0.85
l_obj_new_readobjnamFunction · 0.85
l_obj_atFunction · 0.85
l_obj_nextobjFunction · 0.85
l_obj_containerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected