aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libucl/ucl.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-08 13:01:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-08 13:01:08 +0100
commit9b74e57ad3fb694741fdcf5e27a046fbe99a40f7 (patch)
tree3080fb43edac872ca98c4fe3c5953e59d02ceef9 /contrib/libucl/ucl.h
parent3d8f5c5e7f4ee08aa033805313fe9b5585a2d4fa (diff)
downloadrspamd-9b74e57ad3fb694741fdcf5e27a046fbe99a40f7.tar.gz
rspamd-9b74e57ad3fb694741fdcf5e27a046fbe99a40f7.zip
[Feature] Libucl: Allow to sort keys in ucl objects
Diffstat (limited to 'contrib/libucl/ucl.h')
-rw-r--r--contrib/libucl/ucl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/libucl/ucl.h b/contrib/libucl/ucl.h
index 01542d3c7..b6b9f44c0 100644
--- a/contrib/libucl/ucl.h
+++ b/contrib/libucl/ucl.h
@@ -800,6 +800,19 @@ UCL_EXTERN int ucl_object_compare_qsort (const ucl_object_t **o1,
UCL_EXTERN void ucl_object_array_sort (ucl_object_t *ar,
int (*cmp)(const ucl_object_t **o1, const ucl_object_t **o2));
+enum ucl_object_keys_sort_flags {
+ UCL_SORT_KEYS_DEFAULT = 0,
+ UCL_SORT_KEYS_ICASE = (1u << 0u),
+ UCL_SORT_KEYS_RECURSIVE = (1u << 1u),
+};
+/***
+ * Sorts keys in object in place
+ * @param obj
+ * @param how
+ */
+UCL_EXTERN void ucl_object_sort_keys (ucl_object_t *obj,
+ enum ucl_object_keys_sort_flags how);
+
/**
* Get the priority for specific UCL object
* @param obj any ucl object