Commit graph

20 commits

Author SHA1 Message Date
Edoardo Lolletti
b91dd7f752 Assert various warnings when compiling x64 with msvc 2024-04-15 22:39:25 +02:00
Edoardo Lolletti
e4fc37a4ca Minor updates 2024-04-02 14:02:23 +02:00
Edoardo Lolletti
f5d77646ec Minor update to counter macro testing 2024-03-09 13:11:34 +01:00
Edoardo Lolletti
31f98dea08 Support using LUA_FUNCTION macros without relying on __COUNTER__
__COUNTER__ is a nonstandard extension, and a random compiler might not be implementing it, or could be implementing it in a broken way, to address that, add fallback equivalent code utilizing __LINE__ to generate the luaL_Reg elements, still at compile time. This is not enabled by default because it increases build times as it performs more computations.
2024-03-08 22:39:06 +01:00
Edoardo Lolletti
a5de6e3cf2 Declare default parameters for lua_functions as const
Prevents accidental redefinition
2024-02-18 13:26:46 +01:00
Edoardo Lolletti
ff41aec90a Update header inclusion 2024-01-05 13:03:46 +01:00
Edoardo Lolletti
c8399f0b57 function_array_helper: handle __COUNTER__ not being 0 2024-01-03 01:35:35 +01:00
Edoardo Lolletti
da45f91460 Update copyright for 2024 2024-01-03 01:21:08 +01:00
Edoardo Lolletti
149823e576 Fix wrong logic in LUA_INLINE definition 2023-12-25 13:22:08 +01:00
Edoardo Lolletti
da0e46495b Declare lua functions as no inline while building in debug mode 2023-12-24 17:47:35 +01:00
Edoardo Lolletti
b7893b6408 Add NoInline define and rename __forceinline
Define __forceinline as ForceInline
2023-12-24 17:47:19 +01:00
Edoardo Lolletti
f8973adfc2 LUA_FUNCTION: Use forceinline only in release builds 2023-12-03 14:43:52 +01:00
Edoardo Lolletti
434b775193 C++17 constructs 2023-11-26 17:47:46 +01:00
Edoardo Lolletti
c46f77741a Rename macro parameter in LUA_DECLARE_ALIAS_INT 2023-11-25 12:31:02 +01:00
Edoardo Lolletti
20fbf2d87e LUA_FUNCTION: directly pass pduel in the function scope
Update lua functions to already have the pduel parameter passed inside them, thus not needing to manually retrieve them in the functions.
Add also a yieldk macro that does the same thing but for the yield continuation function, removing the redoundancies
2023-11-25 11:15:21 +01:00
Edoardo Lolletti
420d5b6107 LUA_FUNCTION: directly pass "self" parameter referring to the object
Most of the library functions are used as "class member functions" where the first parameter is always the corresponding lua object, update the LUA_FUNCTION macro so that the functions already have a "self" parameter corresponding to the already parsed lua object.
Added a new LUA_STATIC_FUNCTION macro for functions that are to be called without an associated object
2023-11-21 11:56:23 +01:00
Edoardo Lolletti
97b31cb721 Address some warnings 2023-08-12 10:19:31 +02:00
Edoardo Lolletti
eb82fa3c57 Minor syntax/readibility updates 2022-09-17 12:46:51 +02:00
Edoardo Lolletti
91c03d5c6f Update GET_LUA_FUNCTIONS_ARRAY
Remove unneded extra indirection function
2022-05-15 19:49:46 +02:00
Edoardo Lolletti
0e1cf7ee23 Add helper header 2022-05-15 16:02:35 +02:00