From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id F23605A9F2A; Mon, 4 Sep 2023 12:30:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F23605A9F2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1693819816; bh=dwOrSgVpU7VsDrv0PLtmI+dje/JYIxxNd0tOmPXseXM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=KtgLkw1ohnIA00V+WOmu6hhRqRoHe3WwySfMW1cOWO18U33c6gz+wUS8P2+DZo5rL JSR+PQZQp/m5noQgeXqLgfdSGbqC1x7t3vI33nC6U+tI1SnUhdBWipXD/gidv7xKPi 6q+T7E5IfzTy8J+/Rqa8jA6OwD2JtbBi8w94PydE= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [95.163.41.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9DFF15A9F2A for ; Mon, 4 Sep 2023 12:30:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9DFF15A9F2A Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1qd5uP-00GN3u-05; Mon, 04 Sep 2023 12:30:13 +0300 Date: Mon, 4 Sep 2023 12:30:12 +0300 To: Sergey Kaplun Message-ID: <6sq7pi6oj2l7pthtsw7hmq2nepbesy4lfgvj2zr37nlbt4nvav@qa2ovqh3i5ee> References: <1b01124ea966b486d9462dea0d3653a45c4f81b1.1693481682.git.m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96E142CFC92DB15CD54A6D482CE9F3536BD31E9EB83FC0CF7182A05F53808504044F4AEB8CC6F25E47926E6AB824238CF47872448C8EF5D7A84B951C02DD5C496 X-C1DE0DAB: 0D63561A33F958A5F47E2ACAC20FE887CB735A38C6E5A8837F3818F7AA440AD6F87CCE6106E1FC07E67D4AC08A07B9B0735DFC8FA7AC1207CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0AD5177F0B940C8B66ECE892A7B2722663E91682638B966EB3F662256BEEFA9527FB23452AA1C20614F4A517A966373A18C46FF9C707DB19683D7843C9AF858A999186A36B8C1A491C837FD76D11AF80A0D082F74781BF4061141FEE728B4E3504FEA455F16B58544A21C197AAF4D2E4732965026E5D17F6739C77C69D99B9914278E50E1F0597A6FD5CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojNmsqR+t6vc9oh6RYj0Fh9A== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE4071C279EF6CA236F0B80D0AE71880871BA62F87B7200F944B0D51284F0FE6F529ABC7555A253F5B200DF104D74F62EE79D27EC13EC74F6107F4198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH luajit v9 1/2] tools: add cli flag to run profile dump parsers X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Cc: Maxim Kokryashkin , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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)); > > +} > > + > > > > -- > Best regards, > Sergey Kaplun