action_list_new() merged

personal/stbuehler/wip
Thomas Porzelt 15 years ago
commit 98a70336f7

@ -36,6 +36,17 @@ void action_acquire(action *a) {
a->refcount++;
}
action_list *action_list_new() {
action_list *al;
al = g_slice_new(action_list);
al->refcount = 1;
al->actions = g_array_new(FALSE, TRUE, sizeof(action));
return al;
}
void action_list_release(action_list *al) {
assert(al->refcount > 0);
if (!(--al->refcount)) {

@ -63,6 +63,7 @@ struct action {
};
LI_API void action_list_release(action_list *al);
LI_API action_list *action_list_new();
/* no new/free function, so just use the struct direct (i.e. not a pointer) */
LI_API void action_stack_init(action_stack *as);

Loading…
Cancel
Save