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

Function dobjsfree

src/mkobj.c:2830–2843  ·  view source on GitHub ↗

free all the objects marked for deletion */

Source from the content-addressed store, hash-verified

2828
2829/* free all the objects marked for deletion */
2830void
2831dobjsfree(void)
2832{
2833 struct obj *otmp;
2834
2835 while (go.objs_deleted) {
2836 otmp = go.objs_deleted;
2837 go.objs_deleted = otmp->nobj;
2838 if (otmp->where != OBJ_DELETED)
2839 panic("dobjsfree: obj where=%d, not OBJ_DELETED", otmp->where);
2840 obj_extract_self(otmp);
2841 dealloc_obj_real(otmp);
2842 }
2843}
2844
2845/* create an object from a horn of plenty; mirrors bagotricks(makemon.c) */
2846int

Callers 4

allmain.cFile · 0.85
savelev_coreFunction · 0.85
freedynamicdataFunction · 0.85
makemap_prepostFunction · 0.85

Calls 3

obj_extract_selfFunction · 0.85
dealloc_obj_realFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected