From 706771e357570d1bee268fc7c2233506da967bcd Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 3 Feb 2023 16:48:34 +0100 Subject: Add new plist_sort() function --- include/plist/plist.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/plist/plist.h b/include/plist/plist.h index 2bb947f..0a21499 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -1071,6 +1071,14 @@ extern "C" */ int plist_data_val_contains(plist_t datanode, const uint8_t* cmpval, size_t n); + /** + * Sort all PLIST_DICT key/value pairs in a property list lexicographically + * by key. Recurses into the child nodes if necessary. + * + * @param plist The property list to perform the sorting operation on. + */ + void plist_sort(plist_t plist); + /** * Free memory allocated by relevant libplist API calls: * - plist_to_xml() -- cgit v1.1-32-gdbae