예제 #1
0
void
delete_proplist(PropPtr p)
{
	if (!p)
		return;
	delete_proplist(AVL_LF(p));
	delete_proplist(PropDir(p));
	delete_proplist(AVL_RT(p));
	free_propnode(p);
}
예제 #2
0
static PropPtr
delnode(char *key, PropPtr avl)
{
	PropPtr save;

	save = remove_propnode(key, &avl);
	if (save)
		free_propnode(save);
	return avl;
}
예제 #3
0
/**
 * Recursively deletes an entire proplist AVL with 'p' as the root,
 * and frees 'p' itself.
 *
 * @param p The proplist to delete.
 */
void
delete_proplist(PropPtr p)
{
    if (!p)
        return;

    delete_proplist(p->left);
    delete_proplist(PropDir(p));
    delete_proplist(p->right);
    free_propnode(p);
}