From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 765CC23C2A for ; Fri, 11 Jan 2019 09:05:38 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JK6gZm-CnYq3 for ; Fri, 11 Jan 2019 09:05:38 -0500 (EST) Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3168B23A54 for ; Fri, 11 Jan 2019 09:05:38 -0500 (EST) Date: Fri, 11 Jan 2019 17:05:35 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v1 1/4] box: rename space->opts checks to checks_ast Message-ID: <20190111140535.GA31711@chai> References: <347e0f9e4c81bf76520c167a00f7af661b76aa64.1547128310.git.kshcherbatov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <347e0f9e4c81bf76520c167a00f7af661b76aa64.1547128310.git.kshcherbatov@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: korablev@tarantool.org, Kirill Shcherbatov * Kirill Shcherbatov [19/01/10 23:12]: > + /** Checks AST expressions list. */ > + struct ExprList *checks_ast; I don't understand the comment. Is it a list of syntax trees or a syntax tree containing all checks? You can't use plural in an adjective. This is a systematic error which I have been pointing out before. > --- a/src/box/sql.c > +++ b/src/box/sql.c > @@ -1048,7 +1048,7 @@ sql_encode_table_opts(struct region *region, struct Table *table, > int checks_cnt = 0; > struct ExprList_item *a; > bool is_view = table->def->opts.is_view; > - struct ExprList *checks = table->def->opts.checks; > + struct ExprList *checks = table->def->opts.checks_ast; It's good manners to consistently rename stack variables when renaming the corresponding member. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov