action_list_new() added
parent
cbf88bb3ee
commit
a449c4e842
|
@ -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…
Reference in New Issue