From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 19 Nov 2018 20:53:01 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v5 05/12] lib: implement JSON tree class for json library Message-ID: <20181119175301.dscbvmgkqlv7hbm4@esperanza> References: <20181101150854.GG30032@chai> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org, Kostya Osipov List-ID: On Tue, Nov 06, 2018 at 03:15:08PM +0300, Kirill Shcherbatov wrote: > > This is hard to read. It's hard to see whether it's a hash lookup > > or a tree lookup. Let's perhaps rename mh_node_t to mh_entry_t. > Ok, done. > > > Even more confusing is json_path_node and json_tree_node. > > Let's take time to come up with better names. > Maybe the "json_tree_entry" is a better name for JSON tree record structure? > As for json_tree_node, this is an existent class that I don't touch in my patch at all. I think Kostja meant that we need to rename json_path_node as well so as to avoid confusion with json_tree_node. What about json_path_token? Then json_path_parser would be called json_path_tokenizer. Also, this patch doesn't compile on my laptop: In file included from /home/vlad/src/tarantool/src/box/tuple_format.h:37:0, from /home/vlad/src/tarantool/src/box/tuple_format.c:33: /home/vlad/src/tarantool/src/box/tuple_format.c: In function ‘tuple_format_alloc’: /home/vlad/src/tarantool/src/lib/json/tree.h:221:22: error: value computed is not used [-Werror=unused-value] (__iter != NULL && (__tmp_iter = \ ^ /home/vlad/src/tarantool/src/box/tuple_format.c:430:2: note: in expansion of macro ‘json_tree_foreach_entry_safe’ json_tree_foreach_entry_safe(field, &format->field_tree.root, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/vlad/src/tarantool/src/box/tuple_format.c: In function ‘tuple_format_destroy’: /home/vlad/src/tarantool/src/lib/json/tree.h:221:22: error: value computed is not used [-Werror=unused-value] (__iter != NULL && (__tmp_iter = \ ^ /home/vlad/src/tarantool/src/box/tuple_format.c:443:2: note: in expansion of macro ‘json_tree_foreach_entry_safe’ json_tree_foreach_entry_safe(field, &format->field_tree.root, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please fix and rebased on top of the latest 2.1.