Rename "status" to "reblog"

FossilOrigin-Name: f04d52ef096ff9cc2dcad28b2916ebe03cc0b8bf48f82adbab6fc65ca1ba2320
This commit is contained in:
me@ow.nekobit.net 2022-04-04 19:17:31 +00:00
parent ddce45ad0e
commit 5d4943f093
2 changed files with 9 additions and 2 deletions

View file

@ -60,7 +60,7 @@ struct mstdnt_status
char* url;
char* in_reply_to_id;
char* in_reply_to_account_id;
struct mstdnt_status* status;
struct mstdnt_status* reblog;
struct mstdnt_poll* poll;
struct mstdnt_card* card;
char* language;

View file

@ -34,6 +34,10 @@ void _mstdnt_val_malloc_status_call(cJSON* v, void* _type)
{
struct mstdnt_status** type = _type;
/* Status value may be NULL */
if (!(v->child))
return;
*type = calloc(1, sizeof(struct mstdnt_status));
if (*type)
@ -73,7 +77,8 @@ int mstdnt_status_from_json(struct mstdnt_status* status, cJSON* js)
{ "favourites_count", &(status->favourites_count), _mstdnt_val_uint_call },
{ "replies_count", &(status->replies_count), _mstdnt_val_uint_call },
{ "media_attachments", &att_args, _mstdnt_val_attachments_call },
{ "pleroma", &(status->pleroma), _mstdnt_val_status_pleroma_call }
{ "pleroma", &(status->pleroma), _mstdnt_val_status_pleroma_call },
{ "reblog", &(status->reblog), _mstdnt_val_malloc_status_call }
};
for (v = js; v; v = v->next)
@ -422,6 +427,8 @@ void mstdnt_cleanup_status(struct mstdnt_status* status)
{
cleanup_attachments(status->media_attachments);
cleanup_status_pleroma(&(status->pleroma));
if (status->reblog)
free(status->reblog);
}
void mstdnt_cleanup_statuses(struct mstdnt_status* statuses, size_t s)