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
return PLIST_ERR_SUCCESS;
}
-int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
+plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify)
{
uint64_t size = 0;
int res;
- if (!plist || !json || !length) {
+ if (!plist || !plist_json || !length) {
return PLIST_ERR_INVALID_ARG;
}
@@ -426,7 +426,7 @@ int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
res = node_to_json(plist, &outbuf, 0, prettify);
if (res < 0) {
str_buf_free(outbuf);
- *json = NULL;
+ *plist_json = NULL;
*length = 0;
return res;
}
@@ -436,7 +436,7 @@ int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
str_buf_append(outbuf, "\0", 1);
- *json = outbuf->data;
+ *plist_json = outbuf->data;
*length = outbuf->len - 1;
outbuf->data = NULL;
@@ -782,7 +782,7 @@ static plist_t parse_object(const char* js, jsmntok_info_t* ti, int* index)
return obj;
}
-int plist_from_json(const char *json, uint32_t length, plist_t * plist)
+plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist)
{
if (!plist) {
return PLIST_ERR_INVALID_ARG;