Reorder types
FossilOrigin-Name: 5ac9b193a96fc57be698387fa2acf7cb6fb73ce496c91599ad6d796b032b3368
This commit is contained in:
parent
ac44b17fe4
commit
44b1e64c67
2 changed files with 16 additions and 16 deletions
|
@ -17,21 +17,6 @@ typedef int8_t mstdnt_bool;
|
|||
#define MSTDNT_FALSE 1
|
||||
#define MSTDNT_BOOL_UNSET 0
|
||||
|
||||
struct mstdnt_storage;
|
||||
|
||||
typedef void (*mstdnt_data_free_cb_t)(void*);
|
||||
|
||||
typedef struct mstdnt_request_cb_data {
|
||||
struct mstdnt_storage storage;
|
||||
cJSON* root;
|
||||
struct mstdnt_fetch_data* fetch_data;
|
||||
|
||||
void* data;
|
||||
mstdnt_data_free_cb_t data_free_cb;
|
||||
} mstdnt_request_cb_data;
|
||||
|
||||
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
|
||||
typedef enum mstdnt_enum_req
|
||||
|
@ -67,6 +52,21 @@ struct mstdnt_args
|
|||
uint8_t flags;
|
||||
};
|
||||
|
||||
struct mstdnt_storage;
|
||||
|
||||
typedef void (*mstdnt_data_free_cb_t)(void*);
|
||||
|
||||
typedef struct mstdnt_request_cb_data {
|
||||
struct mstdnt_storage storage;
|
||||
cJSON* root;
|
||||
struct mstdnt_fetch_data* fetch_data;
|
||||
|
||||
void* data;
|
||||
mstdnt_data_free_cb_t data_free_cb;
|
||||
} mstdnt_request_cb_data;
|
||||
|
||||
typedef int (*mstdnt_request_cb_t)(mstdnt_request_cb_data* data, void* args);
|
||||
|
||||
struct mstdnt_file
|
||||
{
|
||||
char* file;
|
||||
|
|
|
@ -141,7 +141,7 @@ int mstdnt_await(mastodont_t* mstdnt,
|
|||
// Data used with response, must keep it with request
|
||||
struct mstdnt_fetch_data* data;
|
||||
// Data that the user will work with
|
||||
mstdnt_request_cb_data* results = calloc(1, mstdnt_request_cb_data);
|
||||
mstdnt_request_cb_data* results = calloc(1, sizeof(mstdnt_request_cb_data));
|
||||
results->fetch_data = data; // So we can clean it up
|
||||
|
||||
// Check if our socket is done
|
||||
|
|
Loading…
Reference in a new issue