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 4A0046F3C8; Sat, 24 Sep 2022 17:52:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4A0046F3C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1664031150; bh=THH96LD4HZtyLNmno+5fJsJJtmhtsJCYBZDbt3thltQ=; 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=fibLX2E01QeVsPMtiF2Jj0MlaaD8dtOHuU2LviLezVjySMl273Xz+sG1u925yzcac lXzj/TQUVz6XtR6dYY4BH4TaVkVoR7DIu4rJlTlWOhb8p/0hPcqsynEf9txBf/bzDO MsHcmtfm7KF+tpc6zf9Yco/P2F3Ss14AsvehO7EM= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 8A8D86F3C8 for ; Sat, 24 Sep 2022 17:52:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8A8D86F3C8 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1oc6W2-0002PW-PO; Sat, 24 Sep 2022 17:52:27 +0300 Date: Sat, 24 Sep 2022 17:49:42 +0300 To: Maxim Kokryashkin Message-ID: References: <20220912080158.12220-1-skaplun@tarantool.org> <1663573807.727706952@f769.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1663573807.727706952@f769.i.mail.ru> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD99929F1169E77FC7A3E5D518ECEA6C6B7B689F74CA1E06792182A05F538085040687B9B2CDEB829E9BA28DB5ED38791EDFF8CCE31018B29441FEBF3B25A1258C7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE782A779A89F7D69B2C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE776377A057133B646EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B8859CA687ABA27BAD91D24C28E23996E6E38172F532586BCCC7F00164DA146DAFE8445B8C89999728AA50765F7900637A6F6611B2784C7A4389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC862B3BD3CC35DA588F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C0A8848C216C621A19735652A29929C6C4AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C392AF71FE74A2456CBA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006373BA04B6A498D0BA4731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E142185AC9E3593CE4B31AB1881A6453793CE9274300E5CE05BD4401A9E91200F654B0F56C66D0505D98343C58F38EC06D5558C8C629C1F0AA0F34758FFE6560CD05F29C2B6934AE262D3EE7EAB7254005DCED8DA55E71E02F9FC08E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D348E5EF936B2E46EBA51C835982ECC78AFDE9CAA8A81C780F2B94BF9D6E319C0233D450B610E93B26C1D7E09C32AA3244CE9ECA4AF4210EAC3818DC0F60A8A1D9064EE5813BBCA3A9DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqN03fZIdQ0FppcGjyj7qJg== X-Mailru-Sender: F16D9CAFEEA6770E7B6EAD4ADB3BCAF0745D1F3614903D2F8896A6F8750BEE320519623D50EA6432F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A84198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] FFI: Add tonumber() specialization for failed conversions. 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maxim! Thanks for the review! On 19.09.22, Maxim Kokryashkin wrote: > > Hi, Sergey! > Thanks for the patch! > LGTM, except for a single nit below: > > > >When `tonumber()` is recorded (as a part of a trace) for cdata argument > >can't be converted to number the `nil` value is recorded as the yielded > >result. But without special check on trace for cdata type this nil will > >be returned for another type of cdata that can be converted. > The first sentence lacks commas and is completely unreadable. > I suggest the following fix: > | When `tonumber()` is recorded (as a part of a trace) for a cdata argument that can't be converted to number, the `nil` value is > | recorded as the yielded result. Yes, this is clearer now :). Thanks! > > > >This patch adds the corresponding check for recoding of failed cdata > >conversions. > Typo: s/recoding/recording Fixed, thanks! The new commit message is the following: | FFI: Add tonumber() specialization for failed conversions. | | Contributed by Javier Guerra Giraldez. | | (cherry picked from commit 02b521981a1ab919ff2cd4d9bcaee80baf77dce2) | | When `tonumber()` is recorded (as a part of a trace) for a cdata | argument that can't be converted to a number, the `nil` value is recorded | as the yielded result. But without special check on trace for cdata type | this `nil` will be returned for another type of cdata that can be | converted. | | This patch adds the corresponding check for recording of failed cdata | conversions. | | Sergey Kaplun: | * added the description and the test for the problem | | Resolves tarantool/tarantool#7655 | Part of tarantool/tarantool#7230 Branch is force-pushed. > > -- > Best regards, > Maxim Kokryashkin >   -- Best regards, Sergey Kaplun