From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 76A4C469710 for ; Mon, 18 May 2020 15:04:52 +0300 (MSK) References: <20200512135052.221379-1-gorcunov@gmail.com> <20200512135052.221379-4-gorcunov@gmail.com> From: Oleg Babin Message-ID: <3474ae26-0362-02d9-dc9f-81a7d265fc06@tarantool.org> Date: Mon, 18 May 2020 15:04:49 +0300 MIME-Version: 1.0 In-Reply-To: <20200512135052.221379-4-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 3/7] box/console: rename format to format_yaml List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml LGTM On 12/05/2020 16:50, Cyrill Gorcunov wrote: > This will allow us to implement own formatter for > Lua output mode, so to be precise which exactly formatter > is caller lets rename general "format" to "format_yaml". > > Part-of #4682 > > Signed-off-by: Cyrill Gorcunov > --- > src/box/lua/console.c | 2 +- > src/box/lua/console.lua | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/box/lua/console.c b/src/box/lua/console.c > index d437ff3fe..734c0ee47 100644 > --- a/src/box/lua/console.c > +++ b/src/box/lua/console.c > @@ -352,7 +352,7 @@ lbox_console_add_history(struct lua_State *L) > * parameter. > */ > static int > -lbox_console_format(struct lua_State *L) > +lbox_console_format_yaml(struct lua_State *L) > { > int arg_count = lua_gettop(L); > if (arg_count == 0) { > diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua > index 2add9a79d..5642ca956 100644 > --- a/src/box/lua/console.lua > +++ b/src/box/lua/console.lua > @@ -53,7 +53,7 @@ output_handlers["yaml"] = function(status, opts, ...) > local err > if status then > -- serializer can raise an exception > - status, err = pcall(internal.format, ...) > + status, err = pcall(internal.format_yaml, ...) > if status then > return err > else > @@ -66,7 +66,7 @@ output_handlers["yaml"] = function(status, opts, ...) > err = box.NULL > end > end > - return internal.format({ error = err }) > + return internal.format_yaml({ error = err }) > end > > -- A map for internal symbols in case if they >