set BUGFIX align ly_set_merge() with the latest changes in ly_set_add()
As 3d92e44 changes option parameter of ly_set_add() to a list flag, do
the same also for ly_set_merge() which passes the parameter just to
ly_set_add().
diff --git a/src/set.c b/src/set.c
index 095fb3d..ea338fd 100644
--- a/src/set.c
+++ b/src/set.c
@@ -156,7 +156,7 @@
}
API LY_ERR
-ly_set_merge(struct ly_set *trg, struct ly_set *src, uint32_t options, void *(*duplicator)(void *obj))
+ly_set_merge(struct ly_set *trg, struct ly_set *src, ly_bool list, void *(*duplicator)(void *obj))
{
uint32_t u;
void *obj;
@@ -174,7 +174,7 @@
} else {
obj = src->objs[u];
}
- LY_CHECK_RET(ly_set_add(trg, obj, options, NULL));
+ LY_CHECK_RET(ly_set_add(trg, obj, list, NULL));
}
return LY_SUCCESS;
diff --git a/src/set.h b/src/set.h
index 7b94f13..8db1b23 100644
--- a/src/set.h
+++ b/src/set.h
@@ -97,8 +97,7 @@
*
* @param[in] trg Target (result) set.
* @param[in] src Source set.
- * @param[in] options Options to change behavior of the function. Accepted options are:
- * - #LY_SET_OPT_USEASLIST - add without checking for duplicities
+ * @param[in] list flag to handle set as a list (without checking for (ignoring) duplicit items)
* @param[in] duplicator Optional pointer to function that duplicates the objects being added
* from \p src into \p trg set. If not provided, the \p trg set will point to the exact same
* objects as the \p src set.
@@ -106,7 +105,7 @@
* @return LY_EINVAL in case of invalid input parameters.
* @return LY_EMEM in case of memory allocation failure.
*/
-LY_ERR ly_set_merge(struct ly_set *trg, struct ly_set *src, uint32_t options, void *(*duplicator)(void *obj));
+LY_ERR ly_set_merge(struct ly_set *trg, struct ly_set *src, ly_bool list, void *(*duplicator)(void *obj));
/**
* @brief Learn whether the set contains the specified object.