From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (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 64F2445BE2E for ; Tue, 12 May 2020 16:51:35 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id g1so7825062ljk.7 for ; Tue, 12 May 2020 06:51:35 -0700 (PDT) From: Cyrill Gorcunov Date: Tue, 12 May 2020 16:50:48 +0300 Message-Id: <20200512135052.221379-4-gorcunov@gmail.com> In-Reply-To: <20200512135052.221379-1-gorcunov@gmail.com> References: <20200512135052.221379-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