From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Cc: tarantool-patches@freelists.org, kostja@tarantool.org
Subject: Re: [PATCH v6 1/4] lib: make index_base support for json_lexer
Date: Mon, 10 Dec 2018 20:34:00 +0300 [thread overview]
Message-ID: <20181210173400.7gbaoaljkemp7for@esperanza> (raw)
In-Reply-To: <abeb084fc775e08c4390695750cecc0ac518e0b8.1544084229.git.kshcherbatov@tarantool.org>
On Thu, Dec 06, 2018 at 11:42:28AM +0300, Kirill Shcherbatov wrote:
> Introduced a new index_base field for json_lexer class - this
> value is a base field offset for emitted JSON_TOKEN_NUM tokens.
> Thus, we get rid of the need to perform manual casts using the
> TUPLE_INDEX_BASE constant in the majority of cases. This will
> also ensure that the extracted tuples are correctly inserted
> into the numerical level of JSON tree.
>
> Needed for #1012
> diff --git a/src/lib/json/json.h b/src/lib/json/json.h
> index ead446878..5c8d973e5 100644
> --- a/src/lib/json/json.h
> +++ b/src/lib/json/json.h
> @@ -49,6 +49,11 @@ struct json_lexer {
> int offset;
> /** Current lexer's offset in symbols. */
> int symbol_count;
> + /**
> + * Base field offset for emitted JSON_TOKEN_NUM tokens,
> + * e.g. 0 for C and 1 for Lua.
> + */
> + unsigned index_base;
I changed the type of this member to int, as we use int in
tuple_update_execute(), and pushed it to 2.1.
next prev parent reply other threads:[~2018-12-10 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 8:42 [PATCH v6 0/4] box: JSON tree class Kirill Shcherbatov
2018-12-06 8:42 ` [PATCH v6 1/4] lib: make index_base support for json_lexer Kirill Shcherbatov
2018-12-10 17:34 ` Vladimir Davydov [this message]
2018-12-06 8:42 ` [PATCH v6 2/4] lib: implement JSON tree class for json library Kirill Shcherbatov
2018-12-10 17:36 ` Vladimir Davydov
2018-12-06 8:42 ` [PATCH v6 3/4] box: manage format fields with JSON tree class Kirill Shcherbatov
2018-12-11 9:52 ` Vladimir Davydov
2018-12-06 8:42 ` [PATCH v6 4/4] lib: introduce json_path_cmp, json_path_validate Kirill Shcherbatov
2018-12-10 17:38 ` Vladimir Davydov
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=20181210173400.7gbaoaljkemp7for@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=kostja@tarantool.org \
--cc=kshcherbatov@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [PATCH v6 1/4] lib: make index_base support for json_lexer' \
/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