[Tarantool-patches] [PATCH 3/7] box/console: rename format to format_yaml
Cyrill Gorcunov
gorcunov at gmail.com
Tue May 12 16:50:48 MSK 2020
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 at 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
More information about the Tarantool-patches
mailing list