aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libucl/ucl.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-14 13:34:42 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-14 13:34:42 +0000
commitd212dc2bf89ec79a85fed3e368d171edd77aa7be (patch)
treede2ba2d1f0580fdf9313b7a00796357286e2a97f /contrib/libucl/ucl.h
parentb7420cb4cb0a2c9c96abc18ecd4de3c2bfec98d3 (diff)
downloadrspamd-d212dc2bf89ec79a85fed3e368d171edd77aa7be.tar.gz
rspamd-d212dc2bf89ec79a85fed3e368d171edd77aa7be.zip
Backport fixes from libucl
Diffstat (limited to 'contrib/libucl/ucl.h')
-rw-r--r--contrib/libucl/ucl.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/libucl/ucl.h b/contrib/libucl/ucl.h
index 14e72d119..ba18380a9 100644
--- a/contrib/libucl/ucl.h
+++ b/contrib/libucl/ucl.h
@@ -288,10 +288,12 @@ UCL_EXTERN ucl_object_t* ucl_object_new_full (ucl_type_t type, unsigned priority
/**
* Create new object with userdata dtor
* @param dtor destructor function
+ * @param emitter emitter for userdata
+ * @param ptr opaque pointer
* @return new object
*/
UCL_EXTERN ucl_object_t* ucl_object_new_userdata (ucl_userdata_dtor dtor,
- ucl_userdata_emitter emitter) UCL_WARN_UNUSED_RESULT;
+ ucl_userdata_emitter emitter, void *ptr) UCL_WARN_UNUSED_RESULT;
/**
* Perform deep copy of an object copying everything
@@ -752,6 +754,19 @@ UCL_EXTERN int ucl_object_compare (const ucl_object_t *o1,
const ucl_object_t *o2);
/**
+ * Compare objects `o1` and `o2` useful for sorting
+ * @param o1 the first object
+ * @param o2 the second object
+ * @return values >0, 0 and <0 if `o1` is more than, equal and less than `o2`.
+ * The order of comparison:
+ * 1) Type of objects
+ * 2) Size of objects
+ * 3) Content of objects
+ */
+UCL_EXTERN int ucl_object_compare_qsort (const ucl_object_t **o1,
+ const ucl_object_t **o2);
+
+/**
* Sort UCL array using `cmp` compare function
* @param ar
* @param cmp