summaryrefslogtreecommitdiffstats
path: root/include/plist/plist.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2024-04-14 18:19:14 +0200
committerGravatar Nikias Bassen2024-04-14 18:19:14 +0200
commita91f5740d100414a76959714b819422ee5b2d8a8 (patch)
tree087400da3ed5af11ef1f4806ffc58a9a3a090323 /include/plist/plist.h
parent612cdf3ffd3e8c200e4a21ec15e3b3f0af170b42 (diff)
downloadlibplist-a91f5740d100414a76959714b819422ee5b2d8a8.tar.gz
libplist-a91f5740d100414a76959714b819422ee5b2d8a8.tar.bz2
Change API around #PLIST_DATA to use uint8_t instead of char arrays
This makes it more obvious that it is arbitrary data and not necessarily a string value.
Diffstat (limited to 'include/plist/plist.h')
-rw-r--r--include/plist/plist.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index 46aca16..dcc4a04 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -258,7 +258,7 @@ extern "C"
258 * @return the created item 258 * @return the created item
259 * @sa #plist_type 259 * @sa #plist_type
260 */ 260 */
261 PLIST_API plist_t plist_new_data(const char *val, uint64_t length); 261 PLIST_API plist_t plist_new_data(const uint8_t *val, uint64_t length);
262 262
263 /** 263 /**
264 * Create a new plist_t type #PLIST_DATE 264 * Create a new plist_t type #PLIST_DATE
@@ -445,7 +445,7 @@ extern "C"
445 PLIST_API void plist_dict_get_item_key(plist_t node, char **key); 445 PLIST_API void plist_dict_get_item_key(plist_t node, char **key);
446 446
447 /** 447 /**
448 * Get the nth item in a #PLIST_DICT node. 448 * Get the item for given key in a #PLIST_DICT node.
449 * 449 *
450 * @param node the node of type #PLIST_DICT 450 * @param node the node of type #PLIST_DICT
451 * @param key the identifier of the item to get. 451 * @param key the identifier of the item to get.
@@ -595,7 +595,7 @@ extern "C"
595 * @param length the length of the buffer 595 * @param length the length of the buffer
596 * @note Use plist_mem_free() to free the allocated memory. 596 * @note Use plist_mem_free() to free the allocated memory.
597 */ 597 */
598 PLIST_API void plist_get_data_val(plist_t node, char **val, uint64_t * length); 598 PLIST_API void plist_get_data_val(plist_t node, uint8_t **val, uint64_t * length);
599 599
600 /** 600 /**
601 * Get a pointer to the data buffer of a #PLIST_DATA node. 601 * Get a pointer to the data buffer of a #PLIST_DATA node.
@@ -608,7 +608,7 @@ extern "C"
608 * 608 *
609 * @return Pointer to the buffer 609 * @return Pointer to the buffer
610 */ 610 */
611 PLIST_API const char* plist_get_data_ptr(plist_t node, uint64_t* length); 611 PLIST_API const uint8_t* plist_get_data_ptr(plist_t node, uint64_t * length);
612 612
613 /** 613 /**
614 * Get the value of a #PLIST_DATE node. 614 * Get the value of a #PLIST_DATE node.
@@ -700,7 +700,7 @@ extern "C"
700 * be freed by the node. 700 * be freed by the node.
701 * @param length the length of the buffer 701 * @param length the length of the buffer
702 */ 702 */
703 PLIST_API void plist_set_data_val(plist_t node, const char *val, uint64_t length); 703 PLIST_API void plist_set_data_val(plist_t node, const uint8_t *val, uint64_t length);
704 704
705 /** 705 /**
706 * Set the value of a node. 706 * Set the value of a node.