comparison librpg/rpg/battle-state-victory.c @ 227:befa2e855d3b

core: reinterface the alloc module
author David Demelier <markand@malikania.fr>
date Thu, 19 Nov 2020 10:48:46 +0100
parents c0e0d4accae8
children 76afe639fd72
comparison
equal deleted inserted replaced
226:dd7c8d4321a3 227:befa2e855d3b
73 { 73 {
74 assert(bt); 74 assert(bt);
75 75
76 struct victory *vic; 76 struct victory *vic;
77 77
78 if (!(vic = alloc_zero(1, sizeof (*vic)))) 78 if (!(vic = alloc_new0(sizeof (*vic))))
79 panic(); 79 panic();
80 80
81 /* TODO: compute money, xp and drop. */ 81 /* TODO: compute money, xp and drop. */
82 vic->self.data = vic; 82 vic->self.data = vic;
83 vic->self.handle = handle; 83 vic->self.handle = handle;