From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 437D8469719 for ; Tue, 11 Feb 2020 17:14:29 +0300 (MSK) Date: Tue, 11 Feb 2020 17:14:27 +0300 From: Nikita Pettik Message-ID: <20200211141427.GC5168@tarantool.org> References: <0a6143594e0279d19d3b760a75f0139dbd42dae8.1580841722.git.korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 2/4] sql: refactor sqlVdbeMemNumerify() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On 11 Feb 00:25, Vladislav Shpilevoy wrote: > Hi! Thanks for the patchset! > > On 05/02/2020 17:19, Nikita Pettik wrote: > > Fix codestyle and comment; allow conversion from boolean to number > > (since it is legal to convert boolean to integer, and in turn number > > type completely includes integer type). > > > > Part of #4233 > > --- > > src/box/sql/vdbeInt.h | 12 +++++++++++- > > src/box/sql/vdbemem.c | 46 +++++++++++++++++++--------------------------- > > 2 files changed, 30 insertions(+), 28 deletions(-) > > > > diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h > > index 1393f3fd2..a80a691e1 100644 > > --- a/src/box/sql/vdbeInt.h > > +++ b/src/box/sql/vdbeInt.h > > @@ -533,7 +533,17 @@ mem_value_bool(const struct Mem *mem, bool *b); > > > > int mem_apply_integer_type(Mem *); > > int sqlVdbeMemRealify(Mem *); > > -int sqlVdbeMemNumerify(Mem *); > > + > > +/** > > + * Convert @mem to NUMBER type, so that after conversion it has one > > '@' is a command prefix in Doxygen. The word after '@' is considered > a command. I suppose you didn't mean command 'mem', but rather wanted > to mention a parameter called 'mem'. In that case I suggest '@a mem'. > We use '@a' usually, except some old files, which still can use '\a' > or something like this. Ok (still don't understand origins of @a as a parameter marker): diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h index a80a691e1..9ecf7a486 100644 --- a/src/box/sql/vdbeInt.h +++ b/src/box/sql/vdbeInt.h @@ -535,7 +535,7 @@ int mem_apply_integer_type(Mem *); int sqlVdbeMemRealify(Mem *); /** - * Convert @mem to NUMBER type, so that after conversion it has one + * Convert @a mem to NUMBER type, so that after conversion it has one * of types MEM_Real, MEM_Int or MEM_UInt. If conversion is not possible, * function returns -1. * I've also fixed commit message a bit: sql: rework sqlVdbeMemNumerify() Fix codestyle and comment; allow conversion from boolean to number (since it is legal to convert boolean to integer, and in turn number type completely includes integer type). Note that currently sqlVdbeMemNumerify() is never called, so changes applied to it can't be tested. It is going to be used in the further patches. Part of #4233