2
0
Fork 0

action_list_new() added

personal/stbuehler/wip
Thomas Porzelt 2008-07-08 18:52:14 +02:00
parent cbf88bb3ee
commit a449c4e842
2 changed files with 12 additions and 0 deletions

View File

@ -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)) {

View File

@ -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);