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

Function delete_contents

src/shk.c:1174–1183  ·  view source on GitHub ↗

Delete the contents of the given object. */

Source from the content-addressed store, hash-verified

1172
1173/* Delete the contents of the given object. */
1174void
1175delete_contents(struct obj *obj)
1176{
1177 struct obj *curr;
1178
1179 while ((curr = obj->cobj) != 0) {
1180 obj_extract_self(curr);
1181 obfree(curr, (struct obj *) 0);
1182 }
1183}
1184
1185/* called with two args on merge */
1186void

Callers 5

readobjnamFunction · 0.85
chest_trapFunction · 0.85
poly_objFunction · 0.85
obfreeFunction · 0.85
create_objectFunction · 0.85

Calls 2

obj_extract_selfFunction · 0.85
obfreeFunction · 0.85

Tested by

no test coverage detected