lys_getnext_union_type(const struct lys_type *last, const struct lys_type *type)
{
    FUN_IN;

    int found = 0;

    if (!type || (type->base != LY_TYPE_UNION)) {
        return NULL;
    }

    return lyp_get_next_union_type((struct lys_type *)type, (struct lys_type *)last, &found);
}
lys_getnext_union_type(const struct lys_type *last, const struct lys_type *type)
{
    FUN_IN;

    int found = 0;

    if (!type || (type->base != LY_TYPE_UNION)) {
        return NULL;
    }

    return lyp_get_next_union_type((struct lys_type *)type, (struct lys_type *)last, &found);
}