Fix namespaces
FossilOrigin-Name: 925359d0707de10f874d69058791955ae9bbf9b663867af865a7cd1c65649b4a
This commit is contained in:
parent
964c3a3b9a
commit
8ffbec6620
7 changed files with 15 additions and 13 deletions
|
@ -41,12 +41,13 @@ struct mstdnt_emoji_reaction
|
|||
/* TODO Accounts */
|
||||
};
|
||||
|
||||
// TODO move static?
|
||||
void load_emoji_from_json(struct mstdnt_emoji* emo, cJSON* emo_json);
|
||||
void load_emoji_react_from_json(struct mstdnt_emoji_reaction* emo, cJSON* emo_json);
|
||||
void _mstdnt_val_emojis_call(cJSON* v, void* _type);
|
||||
void _mstdnt_val_emoji_reactions_call(cJSON* v, void* _type);
|
||||
void cleanup_emoji_reaction(struct mstdnt_emoji_reaction* reactions);
|
||||
void cleanup_emoji_reactions(struct mstdnt_emoji_reaction* reactions, size_t s);
|
||||
void cleanup_emojis(struct mstdnt_emoji* emo);
|
||||
void mstdnt_cleanup_emoji_reaction(struct mstdnt_emoji_reaction* reactions);
|
||||
void mstdnt_cleanup_emoji_reactions(struct mstdnt_emoji_reaction* reactions, size_t s);
|
||||
void mstdnt_cleanup_emojis(struct mstdnt_emoji* emo);
|
||||
|
||||
#endif /* MASTODONT_EMOJI */
|
||||
|
|
|
@ -36,7 +36,7 @@ struct mstdnt_status_pleroma
|
|||
int thread_muted;
|
||||
};
|
||||
|
||||
void cleanup_status_pleroma(struct mstdnt_status_pleroma* pleroma);
|
||||
void mstdnt_cleanup_status_pleroma(struct mstdnt_status_pleroma* pleroma);
|
||||
int mstdnt_status_pleroma_from_json(struct mstdnt_status_pleroma* pleroma, cJSON* js);
|
||||
void _mstdnt_val_status_pleroma_call(cJSON* v, void* _type);
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ MSTDNT_ACCOUNT_ACTION_FUNC_URL("unsubscribe")
|
|||
void mstdnt_cleanup_account(struct mstdnt_account* acct)
|
||||
{
|
||||
if (!acct) return;
|
||||
cleanup_emojis(acct->emojis);
|
||||
mstdnt_cleanup_emojis(acct->emojis);
|
||||
}
|
||||
|
||||
void mstdnt_cleanup_accounts(struct mstdnt_account* accts, size_t len)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <mastodont_request.h>
|
||||
#include <mastodont_generate.h>
|
||||
#include <mastodont_json_helper.h>
|
||||
#include <mastodont_emoji.h>
|
||||
|
||||
struct _mstdnt_chats_cb_args
|
||||
{
|
||||
|
|
|
@ -112,22 +112,22 @@ void _mstdnt_val_emojis_call(cJSON* v, void* _type)
|
|||
}
|
||||
}
|
||||
|
||||
void cleanup_emoji_reaction(struct mstdnt_emoji_reaction* reaction)
|
||||
void mstdnt_cleanup_emoji_reaction(struct mstdnt_emoji_reaction* reaction)
|
||||
{
|
||||
/* NOP, this will be implemented soon*/
|
||||
return;
|
||||
}
|
||||
|
||||
void cleanup_emoji_reactions(struct mstdnt_emoji_reaction* reactions, size_t s)
|
||||
void mstdnt_cleanup_emoji_reactions(struct mstdnt_emoji_reaction* reactions, size_t s)
|
||||
{
|
||||
size_t i;
|
||||
if (!reactions) return;
|
||||
for (i = 0; i < s; ++i)
|
||||
cleanup_emoji_reaction(reactions + s);
|
||||
mstdnt_cleanup_emoji_reaction(reactions + s);
|
||||
free(reactions);
|
||||
}
|
||||
|
||||
void cleanup_emojis(struct mstdnt_emoji* emo)
|
||||
void mstdnt_cleanup_emojis(struct mstdnt_emoji* emo)
|
||||
{
|
||||
if (!emo) return;
|
||||
free(emo);
|
||||
|
|
|
@ -54,9 +54,9 @@ void _mstdnt_val_status_pleroma_call(cJSON* v, void* _type)
|
|||
mstdnt_status_pleroma_from_json(type, v->child);
|
||||
}
|
||||
|
||||
void cleanup_status_pleroma(struct mstdnt_status_pleroma* pleroma)
|
||||
void mstdnt_cleanup_status_pleroma(struct mstdnt_status_pleroma* pleroma)
|
||||
{
|
||||
if (!pleroma) return;
|
||||
cleanup_emoji_reactions(pleroma->emoji_reactions, pleroma->emoji_reactions_len);
|
||||
mstdnt_cleanup_emoji_reactions(pleroma->emoji_reactions, pleroma->emoji_reactions_len);
|
||||
}
|
||||
|
||||
|
|
|
@ -564,8 +564,8 @@ void mstdnt_cleanup_status(struct mstdnt_status* status)
|
|||
{
|
||||
mstdnt_cleanup_attachments(status->media_attachments);
|
||||
mstdnt_cleanup_account(&(status->account));
|
||||
cleanup_status_pleroma(&(status->pleroma));
|
||||
cleanup_emojis(status->emojis);
|
||||
mstdnt_cleanup_status_pleroma(&(status->pleroma));
|
||||
mstdnt_cleanup_emojis(status->emojis);
|
||||
if (status->reblog)
|
||||
{
|
||||
mstdnt_cleanup_status(status->reblog);
|
||||
|
|
Loading…
Reference in a new issue