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,