summaryrefslogtreecommitdiffstats
path: root/src/jplist.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-05-14 01:44:08 +0200
committerGravatar Nikias Bassen2023-05-14 01:44:08 +0200
commitb7d74590ebc1d7068867fdb29fafb9a934d02526 (patch)
treedabc123e03e592f7812016dd253621936a49c7fc /src/jplist.c
parentff0010080bbab16ec7b12b7f71e958d1e4f6f94b (diff)
downloadlibplist-b7d74590ebc1d7068867fdb29fafb9a934d02526.tar.gz
libplist-b7d74590ebc1d7068867fdb29fafb9a934d02526.tar.bz2
Make sure function signatures match their declarations in the public header
Diffstat (limited to 'src/jplist.c')
-rw-r--r--src/jplist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jplist.c b/src/jplist.c
index ca4743c..f6c96ca 100644
--- a/src/jplist.c
+++ b/src/jplist.c
@@ -398,12 +398,12 @@ static int node_estimate_size(node_t node, uint64_t *size, uint32_t depth, int p
398 return PLIST_ERR_SUCCESS; 398 return PLIST_ERR_SUCCESS;
399} 399}
400 400
401int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify) 401plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify)
402{ 402{
403 uint64_t size = 0; 403 uint64_t size = 0;
404 int res; 404 int res;
405 405
406 if (!plist || !json || !length) { 406 if (!plist || !plist_json || !length) {
407 return PLIST_ERR_INVALID_ARG; 407 return PLIST_ERR_INVALID_ARG;
408 } 408 }
409 409
@@ -426,7 +426,7 @@ int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
426 res = node_to_json(plist, &outbuf, 0, prettify); 426 res = node_to_json(plist, &outbuf, 0, prettify);
427 if (res < 0) { 427 if (res < 0) {
428 str_buf_free(outbuf); 428 str_buf_free(outbuf);
429 *json = NULL; 429 *plist_json = NULL;
430 *length = 0; 430 *length = 0;
431 return res; 431 return res;
432 } 432 }
@@ -436,7 +436,7 @@ int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
436 436
437 str_buf_append(outbuf, "\0", 1); 437 str_buf_append(outbuf, "\0", 1);
438 438
439 *json = outbuf->data; 439 *plist_json = outbuf->data;
440 *length = outbuf->len - 1; 440 *length = outbuf->len - 1;
441 441
442 outbuf->data = NULL; 442 outbuf->data = NULL;
@@ -782,7 +782,7 @@ static plist_t parse_object(const char* js, jsmntok_info_t* ti, int* index)
782 return obj; 782 return obj;
783} 783}
784 784
785int plist_from_json(const char *json, uint32_t length, plist_t * plist) 785plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist)
786{ 786{
787 if (!plist) { 787 if (!plist) {
788 return PLIST_ERR_INVALID_ARG; 788 return PLIST_ERR_INVALID_ARG;