From d47cedfe63f0d3799650429beda5cc823ccdc7e8 Mon Sep 17 00:00:00 2001 From: nekobit Date: Fri, 11 Nov 2022 19:45:21 +0000 Subject: [PATCH] Int return value FossilOrigin-Name: f42d5b79c3a34707a149bd61064149ea5b33936ac347c1112cb5fdae522d2514 --- include/mastodont_fetch.h | 2 +- include/mastodont_types.h | 4 ++-- src/fetch.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mastodont_fetch.h b/include/mastodont_fetch.h index cd7d915..a546407 100644 --- a/include/mastodont_fetch.h +++ b/include/mastodont_fetch.h @@ -71,7 +71,7 @@ int mstdnt_fetch_curl_async(mastodont_t* mstdnt, struct mstdnt_args* args, mstdnt_request_cb_t cb_request, void* cb_args, - int (*json_cb)(cJSON*, void*), + int (*json_cb)(cJSON*, void*, mstdnt_request_cb_data*), void* json_args, char* url, CURLoption request_t, diff --git a/include/mastodont_types.h b/include/mastodont_types.h index 0c8a9ac..8933037 100644 --- a/include/mastodont_types.h +++ b/include/mastodont_types.h @@ -30,7 +30,7 @@ typedef int8_t mstdnt_bool; struct mstdnt_storage; -typedef void (*mstdnt_data_free_cb_t)(void*, size_t); +typedef void (*mstdnt_data_free_cb_t)(void*); typedef struct mstdnt_request_cb_data { struct mstdnt_storage* storage; @@ -38,7 +38,7 @@ typedef struct mstdnt_request_cb_data { mstdnt_data_free_cb_t data_free_cb; } mstdnt_request_cb_data; -typedef void (*mstdnt_request_cb_t)(mstdnt_request_cb_data* data, void* args); +typedef int (*mstdnt_request_cb_t)(mstdnt_request_cb_data* data, void* args); // Return types for mstdnt_request_cb_t, specifies // what we want to do with the data diff --git a/src/fetch.c b/src/fetch.c index 10a4973..61de5e2 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -52,7 +52,7 @@ int mstdnt_fetch_curl_async(mastodont_t* mstdnt, struct mstdnt_args* m_args, mstdnt_request_cb_t cb_request, void* cb_args, - int (*json_cb)(cJSON*, void*), + int (*json_cb)(cJSON*, void*, mstdnt_request_cb_data*), void* json_args, char* _url, CURLoption request_t,