[Tarantool-patches] [PATCH v2 luajit 03/26] test: separate LuaJIT helpers from ffi_util.inc

Sergey Kaplun skaplun at tarantool.org
Tue Feb 6 14:47:50 MSK 2024


Hi, Maxim!
Thanks for the review!
Fixed your comments, see the iterative patch below.

On 31.01.24, Maxim Kokryashkin wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, except for a few nits below.
> 
> On Mon, Jan 29, 2024 at 01:45:03PM +0300, Sergey Kaplun wrote:
> > This patch moves common helpers from <LuaJIT-tests/common/ffi_util.inc>

<snipped>

> > --- /dev/null
> > +++ b/test/LuaJIT-tests/common/ffi/checktypes.lua
> > @@ -0,0 +1,15 @@
> > +local ffi = require("ffi")
> > +
> > +-- Checker that takes an array with the following each 3 elements:
> Typo: s/each 3 elements/triplets/

Fixed thanks!

> > +-- 1) Sizeof for the given C type to be checked.
> > +-- 2) Alignof for the given C type to be checked.
> Nit: `sizeof()` and `alignof()` or something like that? Feel free to
> ignore.

Renamed.

===================================================================
diff --git a/test/LuaJIT-tests/common/ffi/checktypes.lua b/test/LuaJIT-tests/common/ffi/checktypes.lua
index c995d667..b5e04480 100644
--- a/test/LuaJIT-tests/common/ffi/checktypes.lua
+++ b/test/LuaJIT-tests/common/ffi/checktypes.lua
@@ -1,8 +1,8 @@
 local ffi = require("ffi")
 
--- Checker that takes an array with the following each 3 elements:
--- 1) Sizeof for the given C type to be checked.
--- 2) Alignof for the given C type to be checked.
+-- Checker that takes an array with the following triplets:
+-- 1) `sizeof()` for the given C type to be checked.
+-- 2) `alignof()` for the given C type to be checked.
 -- 3) String representing the C type.
 return function(t)
   for i=1,1e9,3 do
===================================================================

> > +-- 3) String representing the C type.

<snipped>

> >

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list