[tarantool-patches] Re: [PATCH v5 05/12] lib: implement JSON tree class for json library

Vladimir Davydov vdavydov.dev at gmail.com
Mon Nov 19 20:53:01 MSK 2018


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.



More information about the Tarantool-patches mailing list