[Tarantool-patches] [PATCH luajit v9 1/2] tools: add cli flag to run profile dump parsers

Maxim Kokryashkin m.kokryashkin at tarantool.org
Mon Sep 4 12:30:12 MSK 2023


Hi, Sergey!
Thanks for the review!
Fixed your comment, branch is force-pushed.
On Sun, Sep 03, 2023 at 12:50:43PM +0300, Sergey Kaplun wrote:
> Hi, Maxim!
> Thanks for the patch!
> LGTM, with a single nit below.
> 
> 
> > +static int runtoolcmd(lua_State *L, const char *tool_name)
> > +{
> > +  lua_getglobal(L, "require");
> > +  lua_pushstring(L, tool_name);
> > +  if (lua_pcall(L, 1, 1, 0)) {
> > +    const char *msg = lua_tostring(L, -1);
> > +    if (msg) {
> > +      if (!strncmp(msg, "module ", 7))
> > +        msg = "unknown luaJIT command or tools not installed";
> 
> Nit: Use tab here for indentation.
Fixed. Here is the diff:
==============================================================================
diff --git a/src/luajit.c b/src/luajit.c
index f57b7e95..84472464 100644
--- a/src/luajit.c
+++ b/src/luajit.c
@@ -370,7 +370,7 @@ static int runtoolcmd(lua_State *L, const char *tool_name)
     const char *msg = lua_tostring(L, -1);
     if (msg) {
       if (!strncmp(msg, "module ", 7))
-        msg = "unknown luaJIT command or tools not installed";
+	msg = "unknown luaJIT command or tools not installed";
       l_message(progname, msg);
     }
     return 1;
==============================================================================
> 
> > +      l_message(progname, msg);
> > +    }
> > +    return 1;
> > +  }
> > +  lua_getglobal(L, "arg");
> > +  return report(L, lua_pcall(L, 1, 1, 0));
> > +}
> > +
> 
> <snipped>
> 
> -- 
> Best regards,
> Sergey Kaplun


More information about the Tarantool-patches mailing list