diff options
author | Nikias Bassen | 2024-05-13 19:38:22 +0200 |
---|---|---|
committer | Nikias Bassen | 2024-05-13 19:38:22 +0200 |
commit | 1327c87bf92f1d51286e3172c1047a8a47c5ee3a (patch) | |
tree | 8edf522f2d5b749027810c73b55270a3d3477dc3 /src/plist.c | |
parent | 06877b5ecb9704baded1160a149912fad8141a39 (diff) | |
download | libplist-1327c87bf92f1d51286e3172c1047a8a47c5ee3a.tar.gz libplist-1327c87bf92f1d51286e3172c1047a8a47c5ee3a.tar.bz2 |
Revert "Change API around #PLIST_DATA to use uint8_t instead of char arrays"
This reverts commit a91f5740d100414a76959714b819422ee5b2d8a8.
Diffstat (limited to 'src/plist.c')
-rw-r--r-- | src/plist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plist.c b/src/plist.c index d1b0b5a..a425466 100644 --- a/src/plist.c +++ b/src/plist.c @@ -544,7 +544,7 @@ plist_t plist_new_real(double val) return plist_new_node(data); } -plist_t plist_new_data(const uint8_t *val, uint64_t length) +plist_t plist_new_data(const char *val, uint64_t length) { plist_data_t data = plist_new_plist_data(); data->type = PLIST_DATA; @@ -1385,7 +1385,7 @@ void plist_get_real_val(plist_t node, double *val) assert(length == sizeof(double)); } -void plist_get_data_val(plist_t node, uint8_t **val, uint64_t * length) +void plist_get_data_val(plist_t node, char **val, uint64_t * length) { if (!node || !val || !length) return; @@ -1395,7 +1395,7 @@ void plist_get_data_val(plist_t node, uint8_t **val, uint64_t * length) plist_get_type_and_value(node, &type, (void *) val, length); } -const uint8_t* plist_get_data_ptr(plist_t node, uint64_t* length) +const char* plist_get_data_ptr(plist_t node, uint64_t* length) { if (!node || !length) return NULL; @@ -1404,7 +1404,7 @@ const uint8_t* plist_get_data_ptr(plist_t node, uint64_t* length) return NULL; plist_data_t data = plist_get_data(node); *length = data->length; - return data->buff; + return (const char*)data->buff; } void plist_get_date_val(plist_t node, int32_t * sec, int32_t * usec) @@ -1575,7 +1575,7 @@ void plist_set_real_val(plist_t node, double val) plist_set_element_val(node, PLIST_REAL, &val, sizeof(double)); } -void plist_set_data_val(plist_t node, const uint8_t *val, uint64_t length) +void plist_set_data_val(plist_t node, const char *val, uint64_t length) { plist_set_element_val(node, PLIST_DATA, val, length); } |