From 93c741b938af10a81fbd55cf827456805bcf519a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 25 Sep 2021 22:01:43 +0200 Subject: grem spat --- src/api.c | 4 ++-- src/h.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/api.c b/src/api.c index 7171e3a..a9d9f77 100644 --- a/src/api.c +++ b/src/api.c @@ -135,8 +135,8 @@ signed char dc_json_cb (struct lejp_ctx * ctx, char reason) { /* to prevent warn } if (path == DC_JSON_DM && reason == LEJPCB_OBJECT_END) { struct dc_channel ** channel = &client->guilds[0]->channel; /* 1. guild = DMs */ - while (*channel) - channel = &(*channel)->next; + while (*channel) /* a ni to malo kremž? zakaj dodajam na konec, če bi lahko samo */ + channel = &(*channel)->next; /* dodal na začetek v O(1) */ if (!pass->api_io.channel->id) { dc_channel_free(pass->api_io.channel, DC_UNSET); pass->api_io.channel = NULL; diff --git a/src/h.c b/src/h.c index df7907f..7ace971 100644 --- a/src/h.c +++ b/src/h.c @@ -1,4 +1,3 @@ -/* note: ISAs will (hopefully) no longer be used in my programs in favour of linked lists */ /* ISAs: _sizeof means size of array, _length means usable/initialized members in array */ #define DC_ISA(type, name) type ** name; size_t name##_sizeof; size_t name##_length /* in struct array */ #define DC_ALLOC_CHUNK 1 -- cgit v1.2.3