From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@dev.tarantool.org> Subject: [Tarantool-patches] [PATCH 3/7] box/console: rename format to format_yaml Date: Fri, 8 May 2020 14:47:10 +0300 [thread overview] Message-ID: <20200508114714.426908-4-gorcunov@gmail.com> (raw) In-Reply-To: <20200508114714.426908-1-gorcunov@gmail.com> 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 <gorcunov@gmail.com> --- 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
next prev parent reply other threads:[~2020-05-08 11:47 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-08 11:47 [Tarantool-patches] [PATCH 0/7] box/console: add support for internal types Cyrill Gorcunov 2020-05-08 11:47 ` [Tarantool-patches] [PATCH 1/7] box/console: console_session_vtab -- use designated initialization Cyrill Gorcunov 2020-05-08 11:47 ` [Tarantool-patches] [PATCH 2/7] box/console: use tabs instead of spaces in consolelib Cyrill Gorcunov 2020-05-08 11:47 ` Cyrill Gorcunov [this message] 2020-05-08 11:47 ` [Tarantool-patches] [PATCH 4/7] box/console: rename luaL_yaml_default to serializer_yaml Cyrill Gorcunov 2020-05-08 11:47 ` [Tarantool-patches] [PATCH 5/7] box/console: implement lua serializer Cyrill Gorcunov 2020-05-08 11:47 ` [Tarantool-patches] [PATCH 6/7] box/console: switch to new " Cyrill Gorcunov 2020-05-08 11:47 ` [Tarantool-patches] [PATCH 7/7] test: extend console lua test Cyrill Gorcunov 2020-05-08 16:04 ` [Tarantool-patches] [PATCH 0/7] box/console: add support for internal types Oleg Babin 2020-05-08 16:19 ` Cyrill Gorcunov 2020-05-12 17:06 ` Mons Anderson 2020-05-12 17:31 ` Cyrill Gorcunov 2020-05-12 13:53 ` Cyrill Gorcunov 2020-05-12 13:50 Cyrill Gorcunov 2020-05-12 13:50 ` [Tarantool-patches] [PATCH 3/7] box/console: rename format to format_yaml Cyrill Gorcunov 2020-05-18 12:04 ` Oleg Babin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200508114714.426908-4-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 3/7] box/console: rename format to format_yaml' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox