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 C17521BD853; Thu, 26 Jan 2023 18:56:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C17521BD853 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1674748563; bh=T5F28Zf9wMaG+0JGhtKXeA0iAE0z3NUtXqfAZ3KodwE=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=MbOmPTs3BwxNEvda9I8T970pSgZwv3bCDlw7GF0eHgMR0b1qiQwyIO2DKi+mo/30X nknEhs88VHfqRJCPZboXzVbdBo2XJgEve50RPn1tE6ighJJ+Kq9AeCQw202oiGLkE3 OcfAijO3nqchn1iweSVkdBW1h3dnJEiN5AW9Oqjs= Received: from smtp17.i.mail.ru (smtp17.i.mail.ru [95.163.41.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A6F021BD853 for ; Thu, 26 Jan 2023 18:56:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A6F021BD853 Received: by smtp17.i.mail.ru with esmtpa (envelope-from ) id 1pL4bZ-00G3dv-VL; Thu, 26 Jan 2023 18:56:02 +0300 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) In-Reply-To: <1588326195edd86f5276ad42143043fbde46abeb.1674068996.git.skaplun@tarantool.org> Date: Thu, 26 Jan 2023 18:55:51 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1588326195edd86f5276ad42143043fbde46abeb.1674068996.git.skaplun@tarantool.org> To: Sergey Kaplun X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Mailru-Src: smtp X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9AD83B49AC1DDA089F0C5D8E1EE9CFF90D4851BF92279C488182A05F5380850404C228DA9ACA6FE2708418644D0E2368F6429A2C97E85AA0A23F8994A34CCFEE32E9B56E611CD53AA X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C53D1911AD7E419997BE664DE0C3AF7CBD09E39F8AE56BAD4AE4CB59B0BFB53570F8FDFD662F74671D7E09C32AA3244C0480D228C640221E1FAE309A51E2A8A224AF4FAF06DA24FDFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojSgrCHE6ee1jv5gxVrVaoNQ== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE40749907328163CD4F0DB194C2B2DD1F866695E860E62102A0A19381EE24192DF5555834048F03EF5D4C9A814A92B2E3B1BA4250FC3964EA4964198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH luajit 1/3] sysprof: fix interval parsing in dual-number mode 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: sergos via Tarantool-patches Reply-To: sergos Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Just a nit in message, LGTM. Sergos > On 18 Jan 2023, at 23:16, Sergey Kaplun wrote: >=20 > When the profiling interval is parsed, `tvisnum()` is used to check = that a =20 > the given value is a number. But in case of dual-number mode this = check > returns false as far as the given value is an integer, so = `tvisnumber()` > should be used to cover both cases. > --- > src/lib_misc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/src/lib_misc.c b/src/lib_misc.c > index 06fb9f9f..c18d297e 100644 > --- a/src/lib_misc.c > +++ b/src/lib_misc.c > @@ -209,7 +209,7 @@ static int parse_sysprof_opts(lua_State *L, struct = luam_Sysprof_Options *opt, in > { > cTValue *interval =3D lj_tab_getstr(options, lj_str_newlit(L, = "interval")); > opt->interval =3D SYSPROF_DEFAULT_INTERVAL; > - if (interval && tvisnum(interval)) { > + if (interval && tvisnumber(interval)) { > int32_t signed_interval =3D numberVint(interval); > if (signed_interval < 1) > return PROFILE_ERRUSE; > --=20 > 2.34.1 >=20