summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-05-28 20:50:31 +0200
committerJo-Philipp Wich <jo@mein.io>2023-05-30 10:11:34 +0200
commitd656d150905e8b24deb95707d675db60776c737f (patch)
tree27fe709eb0433397b9218bd8fc835f35325343ad /include
parentd048ea88fe713eab288cdcd50e80223db3c64181 (diff)
types: implement ucv_object_sort()
Introduce a new function `ucv_object_sort()` which works similar to `ucv_array_sort()` and allows reordering the keys of an object. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r--include/ucode/types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ucode/types.h b/include/ucode/types.h
index 22fe9a9..9827db5 100644
--- a/include/ucode/types.h
+++ b/include/ucode/types.h
@@ -369,6 +369,7 @@ size_t ucv_array_length(uc_value_t *);
uc_value_t *ucv_object_new(uc_vm_t *);
uc_value_t *ucv_object_get(uc_value_t *, const char *, bool *);
bool ucv_object_add(uc_value_t *, const char *, uc_value_t *);
+void ucv_object_sort(uc_value_t *, int (*)(const void *, const void *));
bool ucv_object_delete(uc_value_t *, const char *);
size_t ucv_object_length(uc_value_t *);