Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements
@ 2020-10-16 15:26 Sergey Kaplun
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header Sergey Kaplun
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-16 15:26 UTC (permalink / raw)
  To: Igor Munkin, Sergey Ostanevich; +Cc: tarantool-patches

This patch series fix small faults crowed up in the scope of
5a61e1ab54b5c66bfebd836db1ac47996611e065 ('misc: add C and Lua API
for platform metrics').

Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-5187-add-missing-header

Although the CI is red, I found no errors related to LuaJIT.
CI: https://gitlab.com/tarantool/tarantool/-/pipelines/203641026

Sergey Kaplun (3):
  misc: add lmisclib.h to lua.hpp header
  misc: add lib_misc.c to all .bat files
  misc: fix linking when LUA_BUILD_AS_DLL is defined

 src/lj_mapi.c       | 3 +++
 src/lua.hpp         | 1 +
 src/msvcbuild.bat   | 2 +-
 src/ps4build.bat    | 2 +-
 src/psvitabuild.bat | 2 +-
 src/xb1build.bat    | 2 +-
 src/xedkbuild.bat   | 2 +-
 7 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.28.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header
  2020-10-16 15:26 [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Sergey Kaplun
@ 2020-10-16 15:26 ` Sergey Kaplun
  2020-10-18 16:39   ` Igor Munkin
  2020-10-20 12:25   ` Sergey Ostanevich
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files Sergey Kaplun
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-16 15:26 UTC (permalink / raw)
  To: Igor Munkin, Sergey Ostanevich; +Cc: tarantool-patches

This patch adds missing lmisclib.h header to C++ wrapper
for LuaJIT header files as part of extended public API.

Follows up tarantool/tarantool#5187
---
 src/lua.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lua.hpp b/src/lua.hpp
index 07e9002..56ae165 100644
--- a/src/lua.hpp
+++ b/src/lua.hpp
@@ -5,5 +5,6 @@ extern "C" {
 #include "lauxlib.h"
 #include "lualib.h"
 #include "luajit.h"
+#include "lmisclib.h"
 }
 
-- 
2.28.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files
  2020-10-16 15:26 [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Sergey Kaplun
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header Sergey Kaplun
@ 2020-10-16 15:26 ` Sergey Kaplun
  2020-10-16 19:49   ` Sergey Kaplun
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined Sergey Kaplun
  2020-10-18 18:37 ` [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Igor Munkin
  3 siblings, 1 reply; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-16 15:26 UTC (permalink / raw)
  To: Igor Munkin, Sergey Ostanevich; +Cc: tarantool-patches

This patch adds lib_misc.c to ALL_LIB in .bat files
for specific building systems.

Follows up tarantool/tarantool#5187
---
 src/msvcbuild.bat   | 2 +-
 src/ps4build.bat    | 2 +-
 src/psvitabuild.bat | 2 +-
 src/xb1build.bat    | 2 +-
 src/xedkbuild.bat   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat
index 71bde75..b0bddee 100644
--- a/src/msvcbuild.bat
+++ b/src/msvcbuild.bat
@@ -23,7 +23,7 @@
 @set DASC=vm_x86.dasc\r
 @set LJDLLNAME=lua51.dll\r
 @set LJLIBNAME=lua51.lib\r
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c\r
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c\r
 \r
 %LJCOMPILE% host\minilua.c\r
 @if errorlevel 1 goto :BAD\r
diff --git a/src/ps4build.bat b/src/ps4build.bat
index e4a7def..0509f1d 100644
--- a/src/ps4build.bat
+++ b/src/ps4build.bat
@@ -26,7 +26,7 @@
 @set LJMT=mt /nologo\r
 @set DASMDIR=..\dynasm\r
 @set DASM=%DASMDIR%\dynasm.lua\r
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c\r
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c\r
 @set GC64=-DLUAJIT_ENABLE_GC64\r
 @set DASC=vm_x64.dasc\r
 \r
diff --git a/src/psvitabuild.bat b/src/psvitabuild.bat
index 3991dc6..ed1fce1 100644
--- a/src/psvitabuild.bat
+++ b/src/psvitabuild.bat
@@ -14,7 +14,7 @@
 @set LJMT=mt /nologo\r
 @set DASMDIR=..\dynasm\r
 @set DASM=%DASMDIR%\dynasm.lua\r
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c\r
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c\r
 \r
 %LJCOMPILE% host\minilua.c\r
 @if errorlevel 1 goto :BAD\r
diff --git a/src/xb1build.bat b/src/xb1build.bat
index 847e84a..b3948da 100644
--- a/src/xb1build.bat
+++ b/src/xb1build.bat
@@ -14,7 +14,7 @@
 @set LJMT=mt /nologo\r
 @set DASMDIR=..\dynasm\r
 @set DASM=%DASMDIR%\dynasm.lua\r
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c\r
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c\r
 \r
 %LJCOMPILE% host\minilua.c\r
 @if errorlevel 1 goto :BAD\r
diff --git a/src/xedkbuild.bat b/src/xedkbuild.bat
index 240ec87..d108bfc 100644
--- a/src/xedkbuild.bat
+++ b/src/xedkbuild.bat
@@ -14,7 +14,7 @@
 @set LJMT=mt /nologo\r
 @set DASMDIR=..\dynasm\r
 @set DASM=%DASMDIR%\dynasm.lua\r
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c\r
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c\r
 \r
 %LJCOMPILE% host\minilua.c\r
 @if errorlevel 1 goto :BAD\r
-- 
2.28.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined
  2020-10-16 15:26 [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Sergey Kaplun
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header Sergey Kaplun
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files Sergey Kaplun
@ 2020-10-16 15:26 ` Sergey Kaplun
  2020-10-16 19:51   ` Sergey Kaplun
  2020-10-18 18:37 ` [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Igor Munkin
  3 siblings, 1 reply; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-16 15:26 UTC (permalink / raw)
  To: Igor Munkin, Sergey Ostanevich; +Cc: tarantool-patches

For become symbols exportable at several building systems (namely mvsc,
xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at corresponding bat files.
When this macro is defined, the definition of LUA_API macro depends on
LUA_CORE and LUA_LIB macros (see luaconf.h). If defined(LUA_CORE) or
defined(LUA_LIB) then LUA_API macro is defined as
__declspec(dllexport). Otherwise, it defined as __declspec(dllimport).

This patch adds definition of LUA_CORE macro at the top of lj_mapi.c
file to make corresponding symbols exportable for systems described
above.

Follows up tarantool/tarantool#5187
---
 src/lj_mapi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lj_mapi.c b/src/lj_mapi.c
index 13737e0..b2b35a1 100644
--- a/src/lj_mapi.c
+++ b/src/lj_mapi.c
@@ -5,6 +5,9 @@
 ** Copyright (C) 2015-2019 IPONWEB Ltd.
 */
 
+#define lj_mapi_c
+#define LUA_CORE
+
 #include "lua.h"
 #include "lmisclib.h"
 
-- 
2.28.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files Sergey Kaplun
@ 2020-10-16 19:49   ` Sergey Kaplun
  2020-10-18 18:19     ` Igor Munkin
  0 siblings, 1 reply; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-16 19:49 UTC (permalink / raw)
  To: Igor Munkin, Sergey Ostanevich; +Cc: tarantool-patches


Since neither this patch compiles without the following, nor vice versa,
I have merged these two commits into one.

Side note 1: Forgot to say in previous letter: `#define lj_mapi_c` added
for consistency with other LUA_CORE files. AFAIK it is not used
anywhere.

Side note 2: ^M symbols that you may see in your favorite editor is 0xD
character - the carriage return character. Unix uses 0xA for a newline
character. Windows uses a combination of two characters: 0xD and 0xA.

See new full patch below. Branch is force pushed.

===================================================================
commit d3952c3553d78725a565ee535e28e675036cf7d3
Author: Sergey Kaplun <skaplun@tarantool.org>
Date:   Fri Oct 16 15:48:08 2020 +0300

    misc: fix build for Windows-like systems
    
    For become symbols exportable at several building systems
    (namely mvsc, xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at
    corresponding bat files.  When this macro is defined, the definition of
    LUA_API macro depends on LUA_CORE and LUA_LIB macros (see luaconf.h). If
    defined(LUA_CORE) or defined(LUA_LIB) then LUA_API macro is defined as
    __declspec(dllexport). Otherwise, it defined as __declspec(dllimport).
    
    This patch consists from two parts.
    
    First of all it adds lib_misc.c to ALL_LIB in .bat files
    for specific building systems.
    
    Secondly, this patch also adds definition of LUA_CORE macro at the top
    of lj_mapi.c file to make corresponding symbols exportable for systems
    described above.
    
    Follows up tarantool/tarantool#5187

diff --git a/src/lj_mapi.c b/src/lj_mapi.c
index 13737e0..b2b35a1 100644
--- a/src/lj_mapi.c
+++ b/src/lj_mapi.c
@@ -5,6 +5,9 @@
 ** Copyright (C) 2015-2019 IPONWEB Ltd.
 */
 
+#define lj_mapi_c
+#define LUA_CORE
+
 #include "lua.h"
 #include "lmisclib.h"
 
diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat
index 71bde75..b0bddee 100644
--- a/src/msvcbuild.bat
+++ b/src/msvcbuild.bat
@@ -23,7 +23,7 @@
 @set DASC=vm_x86.dasc
 @set LJDLLNAME=lua51.dll
 @set LJLIBNAME=lua51.lib
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c
 
 %LJCOMPILE% host\minilua.c
 @if errorlevel 1 goto :BAD
diff --git a/src/ps4build.bat b/src/ps4build.bat
index e4a7def..0509f1d 100644
--- a/src/ps4build.bat
+++ b/src/ps4build.bat
@@ -26,7 +26,7 @@
 @set LJMT=mt /nologo
 @set DASMDIR=..\dynasm
 @set DASM=%DASMDIR%\dynasm.lua
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c
 @set GC64=-DLUAJIT_ENABLE_GC64
 @set DASC=vm_x64.dasc
 
diff --git a/src/psvitabuild.bat b/src/psvitabuild.bat
index 3991dc6..ed1fce1 100644
--- a/src/psvitabuild.bat
+++ b/src/psvitabuild.bat
@@ -14,7 +14,7 @@
 @set LJMT=mt /nologo
 @set DASMDIR=..\dynasm
 @set DASM=%DASMDIR%\dynasm.lua
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c
 
 %LJCOMPILE% host\minilua.c
 @if errorlevel 1 goto :BAD
diff --git a/src/xb1build.bat b/src/xb1build.bat
index 847e84a..b3948da 100644
--- a/src/xb1build.bat
+++ b/src/xb1build.bat
@@ -14,7 +14,7 @@
 @set LJMT=mt /nologo
 @set DASMDIR=..\dynasm
 @set DASM=%DASMDIR%\dynasm.lua
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c
 
 %LJCOMPILE% host\minilua.c
 @if errorlevel 1 goto :BAD
diff --git a/src/xedkbuild.bat b/src/xedkbuild.bat
index 240ec87..d108bfc 100644
--- a/src/xedkbuild.bat
+++ b/src/xedkbuild.bat
@@ -14,7 +14,7 @@
 @set LJMT=mt /nologo
 @set DASMDIR=..\dynasm
 @set DASM=%DASMDIR%\dynasm.lua
-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
+@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c lib_misc.c
 
 %LJCOMPILE% host\minilua.c
 @if errorlevel 1 goto :BAD
===================================================================

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined Sergey Kaplun
@ 2020-10-16 19:51   ` Sergey Kaplun
  0 siblings, 0 replies; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-16 19:51 UTC (permalink / raw)
  To: Igor Munkin, Sergey Ostanevich; +Cc: tarantool-patches

Please don't regard this patch according to [1].

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/020309.html

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header Sergey Kaplun
@ 2020-10-18 16:39   ` Igor Munkin
  2020-10-20 12:25   ` Sergey Ostanevich
  1 sibling, 0 replies; 14+ messages in thread
From: Igor Munkin @ 2020-10-18 16:39 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

Sergey,

Thanks for the patch! LGTM, no questions.

On 16.10.20, Sergey Kaplun wrote:
> This patch adds missing lmisclib.h header to C++ wrapper
> for LuaJIT header files as part of extended public API.
> 
> Follows up tarantool/tarantool#5187
> ---
>  src/lua.hpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/lua.hpp b/src/lua.hpp
> index 07e9002..56ae165 100644
> --- a/src/lua.hpp
> +++ b/src/lua.hpp
> @@ -5,5 +5,6 @@ extern "C" {
>  #include "lauxlib.h"
>  #include "lualib.h"
>  #include "luajit.h"
> +#include "lmisclib.h"
>  }
>  
> -- 
> 2.28.0
> 

-- 
Best regards,
IM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files
  2020-10-16 19:49   ` Sergey Kaplun
@ 2020-10-18 18:19     ` Igor Munkin
  2020-10-19  4:35       ` Sergey Kaplun
  0 siblings, 1 reply; 14+ messages in thread
From: Igor Munkin @ 2020-10-18 18:19 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

Sergey,

Thanks for the patch! The fix looks quite clear, but I have no way to
check it by myself. This breaks nothing, so LGTM, but please consider my
nits below.

On 16.10.20, Sergey Kaplun wrote:
> 
> Since neither this patch compiles without the following, nor vice versa,
> I have merged these two commits into one.
> 
> Side note 1: Forgot to say in previous letter: `#define lj_mapi_c` added
> for consistency with other LUA_CORE files. AFAIK it is not used
> anywhere.

I also failed to find any usage for it. I found <luajit_c> usage in
luaconf.h. Also, there is <ljamalg_c> usage in lj_def.h. Anyway, I'm for
leaving this line for the sources consistency.

> 
> Side note 2: ^M symbols that you may see in your favorite editor is 0xD
> character - the carriage return character. Unix uses 0xA for a newline
> character. Windows uses a combination of two characters: 0xD and 0xA.
> 
> See new full patch below. Branch is force pushed.
> 
> ===================================================================
> commit d3952c3553d78725a565ee535e28e675036cf7d3
> Author: Sergey Kaplun <skaplun@tarantool.org>
> Date:   Fri Oct 16 15:48:08 2020 +0300
> 
>     misc: fix build for Windows-like systems

Minor: I believe <build> is much better here instead of <misc>.

>     
>     For become symbols exportable at several building systems

Typo: s/For become/To make/.

>     (namely mvsc, xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at
>     corresponding bat files.  When this macro is defined, the definition of

Typo: Doubled whitespace above.

>     LUA_API macro depends on LUA_CORE and LUA_LIB macros (see luaconf.h). If
>     defined(LUA_CORE) or defined(LUA_LIB) then LUA_API macro is defined as
>     __declspec(dllexport). Otherwise, it defined as __declspec(dllimport).

Typo: s/it defined/it is defined/.

>     
>     This patch consists from two parts.
>     
>     First of all it adds lib_misc.c to ALL_LIB in .bat files
>     for specific building systems.
>     
>     Secondly, this patch also adds definition of LUA_CORE macro at the top
>     of lj_mapi.c file to make corresponding symbols exportable for systems
>     described above.
>     
>     Follows up tarantool/tarantool#5187
> 

<snipped>

> ===================================================================
> 
> -- 
> Best regards,
> Sergey Kaplun

-- 
Best regards,
IM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements
  2020-10-16 15:26 [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Sergey Kaplun
                   ` (2 preceding siblings ...)
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined Sergey Kaplun
@ 2020-10-18 18:37 ` Igor Munkin
  2020-10-19  4:27   ` Sergey Kaplun
  3 siblings, 1 reply; 14+ messages in thread
From: Igor Munkin @ 2020-10-18 18:37 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

Sergey,

I would like to ask you to add a "luajit" specifier to the message
subject in further, similar this is added here[1]. It looks convenient,
doesn't it?

On 16.10.20, Sergey Kaplun wrote:
> This patch series fix small faults crowed up in the scope of
> 5a61e1ab54b5c66bfebd836db1ac47996611e065 ('misc: add C and Lua API
> for platform metrics').
> 
> Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-5187-add-missing-header
> 
> Although the CI is red, I found no errors related to LuaJIT.
> CI: https://gitlab.com/tarantool/tarantool/-/pipelines/203641026
> 
> Sergey Kaplun (3):
>   misc: add lmisclib.h to lua.hpp header
>   misc: add lib_misc.c to all .bat files
>   misc: fix linking when LUA_BUILD_AS_DLL is defined
> 
>  src/lj_mapi.c       | 3 +++
>  src/lua.hpp         | 1 +
>  src/msvcbuild.bat   | 2 +-
>  src/ps4build.bat    | 2 +-
>  src/psvitabuild.bat | 2 +-
>  src/xb1build.bat    | 2 +-
>  src/xedkbuild.bat   | 2 +-
>  7 files changed, 9 insertions(+), 5 deletions(-)
> 
> -- 
> 2.28.0
> 

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/020297.html

-- 
Best regards,
IM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements
  2020-10-18 18:37 ` [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Igor Munkin
@ 2020-10-19  4:27   ` Sergey Kaplun
  2020-10-20 15:58     ` Alexander V. Tikhonov
  0 siblings, 1 reply; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-19  4:27 UTC (permalink / raw)
  To: Igor Munkin; +Cc: tarantool-patches

Igor,

On 18.10.20, Igor Munkin wrote:
> Sergey,
> 
> I would like to ask you to add a "luajit" specifier to the message
> subject in further, similar this is added here[1]. It looks convenient,
> doesn't it?

Yes, good idea! I will use this practise.

> 
> On 16.10.20, Sergey Kaplun wrote:
> > This patch series fix small faults crowed up in the scope of

<snipped>

> > 
> 
> [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/020297.html
> 
> -- 
> Best regards,
> IM

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files
  2020-10-18 18:19     ` Igor Munkin
@ 2020-10-19  4:35       ` Sergey Kaplun
  2020-10-20 12:29         ` Sergey Ostanevich
  0 siblings, 1 reply; 14+ messages in thread
From: Sergey Kaplun @ 2020-10-19  4:35 UTC (permalink / raw)
  To: Igor Munkin; +Cc: tarantool-patches

Igor,

Thanks for the review! I've updated commit message considering your
comments. Branch is force pushed.

On 18.10.20, Igor Munkin wrote:
> Sergey,
> 
> Thanks for the patch! The fix looks quite clear, but I have no way to
> check it by myself. This breaks nothing, so LGTM, but please consider my
> nits below.
> 
> On 16.10.20, Sergey Kaplun wrote:

<snipped>

> 
> Minor: I believe <build> is much better here instead of <misc>.

Yes, updated.

> 
> >     
> >     For become symbols exportable at several building systems
> 
> Typo: s/For become/To make/.

Yep, thanks!

> 
> >     (namely mvsc, xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at
> >     corresponding bat files.  When this macro is defined, the definition of
> 
> Typo: Doubled whitespace above.

Thanks again!

> 
> >     LUA_API macro depends on LUA_CORE and LUA_LIB macros (see luaconf.h). If
> >     defined(LUA_CORE) or defined(LUA_LIB) then LUA_API macro is defined as
> >     __declspec(dllexport). Otherwise, it defined as __declspec(dllimport).
> 
> Typo: s/it defined/it is defined/.

Fixed.

> 
> >     
> >     This patch consists from two parts.
> >     
> >     First of all it adds lib_misc.c to ALL_LIB in .bat files
> >     for specific building systems.
> >     
> >     Secondly, this patch also adds definition of LUA_CORE macro at the top
> >     of lj_mapi.c file to make corresponding symbols exportable for systems
> >     described above.
> >     
> >     Follows up tarantool/tarantool#5187
> > 
> 
> <snipped>
> 
> > ===================================================================
> > 
> > -- 
> > Best regards,
> > Sergey Kaplun
> 
> -- 
> Best regards,
> IM

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header
  2020-10-16 15:26 ` [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header Sergey Kaplun
  2020-10-18 16:39   ` Igor Munkin
@ 2020-10-20 12:25   ` Sergey Ostanevich
  1 sibling, 0 replies; 14+ messages in thread
From: Sergey Ostanevich @ 2020-10-20 12:25 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

Hi!

Thanks for the patch, LGTM.

Sergos

On 16 окт 18:26, Sergey Kaplun wrote:
> This patch adds missing lmisclib.h header to C++ wrapper
> for LuaJIT header files as part of extended public API.
> 
> Follows up tarantool/tarantool#5187
> ---
>  src/lua.hpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/lua.hpp b/src/lua.hpp
> index 07e9002..56ae165 100644
> --- a/src/lua.hpp
> +++ b/src/lua.hpp
> @@ -5,5 +5,6 @@ extern "C" {
>  #include "lauxlib.h"
>  #include "lualib.h"
>  #include "luajit.h"
> +#include "lmisclib.h"
>  }
>  
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files
  2020-10-19  4:35       ` Sergey Kaplun
@ 2020-10-20 12:29         ` Sergey Ostanevich
  0 siblings, 0 replies; 14+ messages in thread
From: Sergey Ostanevich @ 2020-10-20 12:29 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

Hi!

Thanks for the patch and review! 

LGTM.

Sergos

On 19 окт 07:35, Sergey Kaplun wrote:
> Igor,
> 
> Thanks for the review! I've updated commit message considering your
> comments. Branch is force pushed.
> 
> On 18.10.20, Igor Munkin wrote:
> > Sergey,
> > 
> > Thanks for the patch! The fix looks quite clear, but I have no way to
> > check it by myself. This breaks nothing, so LGTM, but please consider my
> > nits below.
> > 
> > On 16.10.20, Sergey Kaplun wrote:
> 
> <snipped>
> 
> > 
> > Minor: I believe <build> is much better here instead of <misc>.
> 
> Yes, updated.
> 
> > 
> > >     
> > >     For become symbols exportable at several building systems
> > 
> > Typo: s/For become/To make/.
> 
> Yep, thanks!
> 
> > 
> > >     (namely mvsc, xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at
> > >     corresponding bat files.  When this macro is defined, the definition of
> > 
> > Typo: Doubled whitespace above.
> 
> Thanks again!
> 
> > 
> > >     LUA_API macro depends on LUA_CORE and LUA_LIB macros (see luaconf.h). If
> > >     defined(LUA_CORE) or defined(LUA_LIB) then LUA_API macro is defined as
> > >     __declspec(dllexport). Otherwise, it defined as __declspec(dllimport).
> > 
> > Typo: s/it defined/it is defined/.
> 
> Fixed.
> 
> > 
> > >     
> > >     This patch consists from two parts.
> > >     
> > >     First of all it adds lib_misc.c to ALL_LIB in .bat files
> > >     for specific building systems.
> > >     
> > >     Secondly, this patch also adds definition of LUA_CORE macro at the top
> > >     of lj_mapi.c file to make corresponding symbols exportable for systems
> > >     described above.
> > >     
> > >     Follows up tarantool/tarantool#5187
> > > 
> > 
> > <snipped>
> > 
> > > ===================================================================
> > > 
> > > -- 
> > > Best regards,
> > > Sergey Kaplun
> > 
> > -- 
> > Best regards,
> > IM
> 
> -- 
> Best regards,
> Sergey Kaplun

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements
  2020-10-19  4:27   ` Sergey Kaplun
@ 2020-10-20 15:58     ` Alexander V. Tikhonov
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-20 15:58 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

Hi Sergey, thanks for the patch, I've checked its results on gitlab and
no new degradations found, patch LGTM.

https://gitlab.com/tarantool/tarantool/-/pipelines/205264265

On Mon, Oct 19, 2020 at 07:27:06AM +0300, Sergey Kaplun wrote:
> Igor,
> 
> On 18.10.20, Igor Munkin wrote:
> > Sergey,
> > 
> > I would like to ask you to add a "luajit" specifier to the message
> > subject in further, similar this is added here[1]. It looks convenient,
> > doesn't it?
> 
> Yes, good idea! I will use this practise.
> 
> > 
> > On 16.10.20, Sergey Kaplun wrote:
> > > This patch series fix small faults crowed up in the scope of
> 
> <snipped>
> 
> > > 
> > 
> > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/020297.html
> > 
> > -- 
> > Best regards,
> > IM
> 
> -- 
> Best regards,
> Sergey Kaplun

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-10-20 15:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 15:26 [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Sergey Kaplun
2020-10-16 15:26 ` [Tarantool-patches] [PATCH 1/3] misc: add lmisclib.h to lua.hpp header Sergey Kaplun
2020-10-18 16:39   ` Igor Munkin
2020-10-20 12:25   ` Sergey Ostanevich
2020-10-16 15:26 ` [Tarantool-patches] [PATCH 2/3] misc: add lib_misc.c to all .bat files Sergey Kaplun
2020-10-16 19:49   ` Sergey Kaplun
2020-10-18 18:19     ` Igor Munkin
2020-10-19  4:35       ` Sergey Kaplun
2020-10-20 12:29         ` Sergey Ostanevich
2020-10-16 15:26 ` [Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined Sergey Kaplun
2020-10-16 19:51   ` Sergey Kaplun
2020-10-18 18:37 ` [Tarantool-patches] [PATCH 0/3] LuaJIT misclib minor improvements Igor Munkin
2020-10-19  4:27   ` Sergey Kaplun
2020-10-20 15:58     ` Alexander V. Tikhonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox