/* pushing a TreeItem with a NULL item or subtree is completely valid for this function */ TreeItem push_TreeItem(lua_State *L, proto_tree *tree, proto_item *item) { TreeItem ti = (struct _wslua_treeitem *)g_malloc(sizeof(struct _wslua_treeitem)); ti->tree = tree; ti->item = item; ti->expired = FALSE; g_ptr_array_add(outstanding_TreeItem, ti); return *(pushTreeItem(L,ti)); }
TreeItem* push_TreeItem(lua_State*L, TreeItem t) { g_ptr_array_add(outstanding_TreeItem,t); return pushTreeItem(L,t); }