From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <m.kokryashkin@tarantool.org>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 luajit 09/26] test: enable <ffi_convert.lua> in LuaJIT-tests
Date: Tue, 6 Feb 2024 17:03:57 +0300 [thread overview]
Message-ID: <ZcI8TTjGI6JieNYH@root> (raw)
In-Reply-To: <ZcIv9Dcn8CyC8DN7@root>
Sorry, some fixups:).
On 06.02.24, Sergey Kaplun via Tarantool-patches wrote:
<snipped>
> > > -typedef enum uenum_t {
> > > +typedef enum uenum_convert_t {
> > > UE0, UE71 = 71, UE72
> > > -} uenum_t;
> > > +} uenum_convert_t;
> > `convert` acts as a namespace here, and those are usually used as a
> > prefix. Here and below.
>
> Renamed. See the iterative patch below.
>
> ===================================================================
> diff --git a/test/LuaJIT-tests/lib/ffi/ffi_convert.lua b/test/LuaJIT-tests/lib/ffi/ffi_convert.lua
> index 284f2b53..3d1b0064 100644
> --- a/test/LuaJIT-tests/lib/ffi/ffi_convert.lua
> +++ b/test/LuaJIT-tests/lib/ffi/ffi_convert.lua
> @@ -31,15 +31,15 @@ typedef struct arrinc_t {
> int a[];
> } arrinc_t;
>
> -typedef enum uenum_convert_t {
> +typedef enum convert_uenum_t {
> UE0, UE71 = 71, UE72
> -} uenum_convert_t;
> +} convert_uenum_t;
>
> typedef enum ienum_convert_t {
> IE0, IEM12 = -12, IEM11
> } ienum_convert_t;
>
> -typedef struct foo_convert_t {
> +typedef struct convert_foo_t {
> bool b;
> int8_t i8;
> uint8_t u8;
> @@ -78,9 +78,9 @@ typedef struct foo_convert_t {
> int si_guard;
> nest_t sn;
> uni_t ui;
> - uenum_convert_t ue;
> + convert_uenum_t ue;
> ienum_convert_t ie;
> -} foo_convert_t;
> +} convert_foo_t;
>
> char *strcpy(char *dest, const char *src);
> typedef struct FILE FILE;
> @@ -89,10 +89,10 @@ int _fileno(FILE *stream);
> ]]
>
> do --- misc
> - local foo_convert_t = ffi.typeof("foo_convert_t")
> - local sz = ffi.sizeof(foo_convert_t)
> - local x = foo_convert_t()
> - local y = foo_convert_t()
> + local convert_foo_t = ffi.typeof("convert_foo_t")
> + local sz = ffi.sizeof(convert_foo_t)
> + local x = convert_foo_t()
> + local y = convert_foo_t()
> ffi.fill(x, sz, 0xff)
> ffi.fill(y, sz, 0xee)
>
> ===================================================================
`ienum_convert_t` is renamed too.
===================================================================
diff --git a/test/LuaJIT-tests/lib/ffi/ffi_convert.lua b/test/LuaJIT-tests/lib/ffi/ffi_convert.lua
index 2d530f90..e577001e 100644
--- a/test/LuaJIT-tests/lib/ffi/ffi_convert.lua
+++ b/test/LuaJIT-tests/lib/ffi/ffi_convert.lua
@@ -35,9 +35,9 @@ typedef enum convert_uenum_t {
UE0, UE71 = 71, UE72
} convert_uenum_t;
-typedef enum ienum_convert_t {
+typedef enum convert_ienum_t {
IE0, IEM12 = -12, IEM11
-} ienum_convert_t;
+} convert_ienum_t;
typedef struct convert_foo_t {
bool b;
@@ -79,7 +79,7 @@ typedef struct convert_foo_t {
nest_t sn;
uni_t ui;
convert_uenum_t ue;
- ienum_convert_t ie;
+ convert_ienum_t ie;
} convert_foo_t;
char *strcpy(char *dest, const char *src);
===================================================================
<snipped>
--
Best regards,
Sergey Kaplun
next prev parent reply other threads:[~2024-02-06 14:07 UTC|newest]
Thread overview: 144+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 10:45 [Tarantool-patches] [PATCH v2 luajit 00/26] More tests from LuaJIT-tests, part 1 Sergey Kaplun via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 01/26] cmake: introduce AddTestLib macro Sergey Kaplun via Tarantool-patches
2024-01-31 11:25 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 11:23 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:48 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 14:20 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 02/26] test: prepare lauxilarily libs for LuaJIT-tests Sergey Kaplun via Tarantool-patches
2024-01-31 11:48 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 11:24 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:50 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 14:23 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 03/26] test: separate LuaJIT helpers from ffi_util.inc Sergey Kaplun via Tarantool-patches
2024-01-31 11:58 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 11:47 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:51 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 15:45 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 11:48 ` Sergey Kaplun via Tarantool-patches
2024-02-07 6:49 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 04/26] test: enable <ffi_arith_ptr.lua> in LuaJIT-tests Sergey Kaplun via Tarantool-patches
2024-01-31 12:21 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 15:50 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 05/26] test: enable <ffi_bitfield.lua> " Sergey Kaplun via Tarantool-patches
2024-01-31 12:26 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 11:54 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:52 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 15:52 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 11:55 ` Sergey Kaplun via Tarantool-patches
2024-02-07 6:50 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 06/26] test: enable <ffi_call.lua> " Sergey Kaplun via Tarantool-patches
2024-01-31 12:34 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 15:58 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 12:01 ` Sergey Kaplun via Tarantool-patches
2024-02-07 6:50 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 07/26] test: enable <ffi_callback.lua> " Sergey Kaplun via Tarantool-patches
2024-01-31 13:02 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 16:01 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 08/26] test: enable <ffi_const.lua> " Sergey Kaplun via Tarantool-patches
2024-01-31 14:32 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 12:09 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:52 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 14:32 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 12:10 ` Sergey Kaplun via Tarantool-patches
2024-02-07 6:52 ` Sergey Bronnikov via Tarantool-patches
2024-02-01 16:02 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 09/26] test: enable <ffi_convert.lua> " Sergey Kaplun via Tarantool-patches
2024-01-31 14:55 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 13:11 ` Sergey Kaplun via Tarantool-patches
2024-02-06 14:03 ` Sergey Kaplun via Tarantool-patches [this message]
2024-02-09 14:58 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 16:06 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 13:13 ` Sergey Kaplun via Tarantool-patches
2024-02-01 16:19 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 10/26] test: enable <ffi_enum.lua> " Sergey Kaplun via Tarantool-patches
2024-01-31 14:59 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 16:07 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 11/26] test: enable <ffi_gcstep_recursive.lua> Sergey Kaplun via Tarantool-patches
2024-01-31 15:07 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 13:23 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:58 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 16:10 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 12/26] test: enable <ffi_jit_arith.lua> in LuaJIT-tests Sergey Kaplun via Tarantool-patches
2024-01-31 15:15 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 13:29 ` Sergey Kaplun via Tarantool-patches
2024-02-09 14:59 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 16:12 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 13/26] test: enable <ffi_jit_call.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 8:30 ` Maxim Kokryashkin via Tarantool-patches
2024-02-01 16:15 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 14/26] test: enable <ffi_jit_conv.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 8:32 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 12:51 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 13:33 ` Sergey Kaplun via Tarantool-patches
2024-02-07 6:53 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 15/26] test: enable <ffi_lex_number.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 8:38 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 13:39 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:03 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 12:53 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 16/26] test: enable <ffi_metatype.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 8:40 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 12:58 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 13:48 ` Sergey Kaplun via Tarantool-patches
2024-02-07 7:01 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 17/26] test: enable <ffi_new.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 8:43 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 13:55 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:09 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:03 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 13:58 ` Sergey Kaplun via Tarantool-patches
2024-02-07 7:51 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 18/26] test: enable <ffi_parse_array.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:01 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:11 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:11 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:08 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 14:12 ` Sergey Kaplun via Tarantool-patches
2024-02-07 8:04 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 19/26] test: enable <ffi_parse_basic.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:03 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:15 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:12 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:10 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 20/26] test: enable <ffi_parse_cdef.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:05 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:21 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:12 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:11 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 21/26] test: enable <ffi_parse_struct.lua> LuaJIT test Sergey Kaplun via Tarantool-patches
2024-02-01 9:16 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:23 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:13 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:14 ` Sergey Bronnikov via Tarantool-patches
2024-02-06 14:25 ` Sergey Kaplun via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 22/26] test: enable <ffi_tabov.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:19 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:37 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:13 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:20 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 23/26] test: enable <lightud.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:23 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:43 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:14 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:27 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 24/26] test: enable <api_call.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:25 ` Maxim Kokryashkin via Tarantool-patches
2024-02-06 14:44 ` Sergey Kaplun via Tarantool-patches
2024-02-09 16:15 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:28 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 25/26] test: enable <catch_wrap.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:31 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:32 ` Sergey Bronnikov via Tarantool-patches
2024-01-29 10:45 ` [Tarantool-patches] [PATCH v2 luajit 26/26] test: enable <catch_cpp.lua> " Sergey Kaplun via Tarantool-patches
2024-02-01 9:32 ` Maxim Kokryashkin via Tarantool-patches
2024-02-05 13:32 ` Sergey Bronnikov via Tarantool-patches
2024-02-01 16:32 ` [Tarantool-patches] [PATCH v2 luajit 00/26] More tests from LuaJIT-tests, part 1 Sergey Bronnikov via Tarantool-patches
2024-02-06 17:03 ` Sergey Kaplun via Tarantool-patches
2024-02-07 8:06 ` Sergey Bronnikov via Tarantool-patches
2024-02-07 8:14 ` Sergey Bronnikov via Tarantool-patches
2024-02-15 12:49 ` Sergey Kaplun via Tarantool-patches
2024-02-18 11:48 ` Maxim Kokryashkin via Tarantool-patches
2024-02-18 11:54 ` Sergey Kaplun via Tarantool-patches
2024-02-19 8:56 ` Maxim Kokryashkin via Tarantool-patches
2024-02-20 8:10 ` Sergey Bronnikov via Tarantool-patches
2024-02-28 18:25 ` Sergey Kaplun via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZcI8TTjGI6JieNYH@root \
--to=tarantool-patches@dev.tarantool.org \
--cc=m.kokryashkin@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 luajit 09/26] test: enable <ffi_convert.lua> in LuaJIT-tests' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox