Closed gvanem closed 1 year ago
Hello Gisle,
You are completely right 👍
The LuaRT codebase needs a bit of a cleanup ! For the example provided, I can even not explain it ! Might have been at a time when i was coding half awake 🙈
And this in
compression\Zip.c
:size_t len = 0; char tmp[len+2];
For compatibility with the Visual C++ compiler, a few changes would be enough, such as the example you give with the ?:
operator, a new Makefile or even a solution for Visual Studio.
I need help though as I prefer to focus on fixing bugs and implementing new features rather than using new compilers.
There aren't enough hours in a day...
Update :
I have an internal working version of LuaRT compiled using latest Microsoft Visual C++ 2022, for both x86 and x64 I'm doing tests to chase some residual bugs. If everything works fine, it will be available in next LuaRT release
MSVC compiler support will be available for next LuaRT release, and will become the default target C/C++ compiler
The front-page
README.md
says:OK, I'll try. The major hurdle was these IMO lame gcc contructs:
w = w ?: lua_self(L, lua_gettop(L), Widget);
Why not simply:
w = w ? w : lua_self(L, lua_gettop(L), Widget);
? What is so intuitive and compact with?:
?And this in
compression/Zip.c
:could simply say:
I have several patches sitting here if these above could be fixed first.