From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BE25D4696C0 for ; Fri, 8 May 2020 14:47:53 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id j3so1332067ljg.8 for ; Fri, 08 May 2020 04:47:53 -0700 (PDT) From: Cyrill Gorcunov Date: Fri, 8 May 2020 14:47:10 +0300 Message-Id: <20200508114714.426908-4-gorcunov@gmail.com> In-Reply-To: <20200508114714.426908-1-gorcunov@gmail.com> References: <20200508114714.426908-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: tml 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 -- 2.26.2