From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: Konstantin Osipov <kostja@tarantool.org> Cc: tarantool-patches@freelists.org, vdavydov.dev@gmail.com, Kirill Shcherbatov <kshcherbatov@gmail.com> Subject: Re: [PATCH v1 1/1] implement mp_stack class Date: Thu, 17 Jan 2019 10:26:39 +0300 [thread overview] Message-ID: <4677062d-74d9-b304-6b9f-a3f95309ae38@tarantool.org> (raw) In-Reply-To: <20190116180324.GD3573@chai> Sorry, I've really forgot write a better comments to this structure because it is really trivial. Updated: /** Message pack MP_MAP or MP_ARRAY container descriptor. */ struct mp_frame { /** MP frame type calculated with mp_typeof(). */ enum mp_type type; /** * Total items in MP_MAP or MP_ARRAY container * calculated with mp_decode_map() or mp_decode_array(). */ uint32_t size; /** * Count of items already processed. Must be less or * equal to mp_frame::size member. */ uint32_t curr; }; /** * Stack of service contexts mp_frame to do complex msgpack parse. * The structure is needed in order to facilitate the decoding * nested MP_ARRAY and MP_MAP msgpack containers without * recursion. This allows you to determine that the parsing of * the current container is complete. */ struct mp_stack { /** The maximum stack depth. */ uint32_t size; /** * Count of used stack frames. Corresponds to the index * in the array to perform the push operation. Must be * less or equal to mp_stack::size member. */ uint32_t used; /** * Array of mp_frames descriptors having at least * mp_stack::size items. */ struct mp_frame *frames; };
next prev parent reply other threads:[~2019-01-17 7:26 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-16 13:36 Kirill Shcherbatov 2019-01-16 18:03 ` Konstantin Osipov 2019-01-17 7:26 ` Kirill Shcherbatov [this message] 2019-01-17 7:32 ` [tarantool-patches] " Kirill Shcherbatov 2019-01-17 11:58 ` Alexander Turenko 2019-01-17 12:28 ` [tarantool-patches] " Kirill Shcherbatov 2019-01-17 16:34 ` Alexander Turenko 2019-01-18 7:03 ` Kirill Shcherbatov 2019-01-18 10:32 ` Kirill Shcherbatov 2019-01-21 9:46 ` Kirill Shcherbatov 2019-01-21 11:25 ` Alexander Turenko 2019-01-21 12:35 ` Kirill Shcherbatov 2019-01-21 20:25 ` Vladimir Davydov 2019-01-22 12:28 ` Kirill Shcherbatov 2019-01-22 20:21 ` Vladimir Davydov 2019-01-23 8:23 ` Kirill Shcherbatov 2019-01-23 10:06 ` Vladimir Davydov 2019-01-23 11:39 ` Kirill Shcherbatov 2019-01-24 17:58 ` Konstantin Osipov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4677062d-74d9-b304-6b9f-a3f95309ae38@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=kostja@tarantool.org \ --cc=kshcherbatov@gmail.com \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH v1 1/1] implement mp_stack class' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox