- Moved to C++17 as minimum supported standard C++ version.
- Reworked the whole library to be able to use it without c++ exceptions enabled.
- Breaking Change: The method
Stack<T>::push
now takes astd::error_code&
as last parameter and returns abool
. - Breaking Change: The class
LuaException
has been reworked and it now take astd::error_code
instead of a int. - Breaking Change: The class
LuaException
is now thrown if a unregistered class is pushed via the Stack class, also when callingLuaRef::operator()
, but only if exceptions are enabled. - Breaking Change:
LuaRef::operator()
now returns the classLuaResult
, where it is possible to obtain the call results or error message. - Breaking Change: LuaBridge does not silently enable exceptions when calling
getGlobalNamespace
. CallenableExceptions(lua_State*)
if you want to enable them explicitly. - Breaking Change: Removed
RefCounterPtr
, maintaining the reference counts in a unsynchronized global table is not production quality. - Breaking Change: Removed
Class<T>::addStaticData
, it was just an alias forClass<T>::addStaticProperty
. - Breaking Change: Removed
Class<T>::addCFunction
, it was just an alias forClass<T>::addFunction
. - Breaking Change: Removed
Class<T>::addStaticCFunction
, it was just an alias forClass<T>::addStaticFunction
. - Allow specifying a non virtual base class method when declaring class members (functions or variables) not exposed in the inherited class.
- Allow using capturing lambdas in
Namespace::addFunction
,Namespace::addProperty
,Class<T>::addFunction
,Class<T>::addStaticFunction
,Class<T>::addProperty
andClass<T>::addStaticProperty
. - Added support for specifying factory functor in
Class<T>::addConstructor
to do placement new of the object instance. - Added
Namespace::addVariable
to allow adding a modifiable value by copy into the namespace without incurring in function calls or metatables generation. - Added
getNamespaceFromStack
function to construct a namespace object from a table on the stack. - Added
registerMainThread
function especially useful when using lua 5.1 to register the main lua thread. - Added
std::shared_ptr
support for types intrusively deriving fromstd::enable_shared_from_this
. - Added
Class<T>::addFunction
overload taking alua_CFunction
as if it were a member. - Added
Class<T>::addIndexMetaMethod
to allow register__index
metamethod fallback on a registered class. - Added
Class<T>::addNewIndexMetaMethod
to allow register__newindex
metamethod fallback on a registered class. - Added
LuaRef::isValid
to check when the reference is a LUA_NOREF. - Added
LuaRef::isCallable
to check when the reference is a function or has a__call
metamethod. - Added
LuaException::state
to return thelua_State
associated with the exception. - Added support for
std::byte
as stack value type. - Added support for
std::string_view
as stack value type. - Added support for
std::tuple
as stack value type. - Added support for
std::optional
as stack value type. - Added support for
std::set
as stack value type by usingLuaBridge/Set.h
. - Added support to
LuaRef
for being hashed withstd::hash
(LuaRef
properly usable instd::unordered_map
). - Added single header amalgamated distribution file, to simplify including in projects.
- Added more asserts for functions and property names.
- Renamed
luabridge::Nil
toluabridge::LuaNil
to allow including LuaBridge in Obj-C sources. - Removed the limitation of maximum 8 parameters in functions.
- Removed the limitation of maximum 8 parameters in constructors.
- Removed
Class<T>::addData
, it was just an alias forClass<T>::addProperty
. - Removed
TypeList
from loki, using parameter packs andstd::tuple
withstd::apply
. - Removed juce traces from unit tests, simplified unit tests runs.
- Changed all generic functions in
LuaRef
andTableItem
to accept arguments by const reference instead of by copy. - Fixed issue when
LuaRef::cast<>
fails with exceptions enabled, popping from the now empty stack could trigger the panic handler twice. - Fixed unaligned access in user allocated member pointers in 64bit machines reported by ASAN.
- Fixed access of
LuaRef
in garbage collectedlua_thread
. - Included testing against Luau VM
- Bumped lua 5.2.x in unit tests from lua 5.2.0 to 5.2.4.
- Bumped lua 5.4.x in unit tests from lua 5.4.1 to 5.4.4.
- Run against lua 5.3.6 and 5.4.4 in unit tests.
- Run against Luau and LuaJIT in unit tests.
- Converted the manual from html to markdown.
- Small improvements to code and doxygen comments readability.
- Support for
__fastcall
function pointers.
- Added namespace
addFunction()
acceptingstd::function
(C++11 only). - Added class
addStaticFunction()
acceptingstd::function
(C++11 only). - Update the Doxygen documentation.
- Add brief API reference into the manual.
- Hide non-public
luabridge
members into thedetail
namespace. - Fix stack cleanup by
LuaRef::isInstance()
method.
- Introduce stack
isInstance()
method. - Introduce LuaRef
isInstance()
method. - Added a convenience
isInstance()
function template.
- Do not call the object destructor then its constructor throws.
- String stack get specialization doesn't change the stack value anymore.
- Added namespace
addProperty()
accepting C-functions. - Introduce enableExceptions function.
- Fixed registration continuation for an already registered class.
- Fixed registration continuation issues.
- Added class
addFunction()
accepting proxy functions (C++11 only). - Added class
addFunction()
acceptingstd::function
(C++11 only). - Added class
addProperty()
accepting functions with lua_State* parameter. - Added class
addProperty()
acceptingstd::function
(C++11 only). - Added stack traits for
std::unordered_map
(UnorderedMap.h
). - Now using lightuserdata for function pointers.
- Performance optimization.
- Refactored namespace and class handling.
- Refactored stack operations.
- Handle exceptions in stack operations.
- Added
operator==
andoperator!=
forRefCountedPtr
template.
- Support for
__stdcall
function pointers.
- Added stack traits for
std::vector
(Vector.h
). - Added stack traits for
std::list
(List.h
). - Added stack traits for
std::map
(Map.h
). - Added ability to use
LuaRef
objects as anstd::map
keys. - Fixed some manual errata.
- Numerous bug fixes.
- Feature Requests from Github issues.
- Added
LuaRef
object. - Rewritten documentation.
- Split code up into several files.
- Add Lua table and type representations (based on Nigel's code).
- Reformat documentation as external HTML file.
- Pass
nil
to Lua when a null pointer is passed for objects with shared lifetime.
- Option to hide metatables selectable at runtime, default to true.
addStaticMethod()
renamed toaddStaticFunction()
for consistency.addMethod()
renamed toaddFunction()
for consistency.addCFunction()
registrations.- Convert null pointers to and from
nil
. - Small performance increase in class pointer extraction.
- Backward compatibility with Lua 5.1.x.
- Explicit lifetime management models.
- Generalized containers.
- Single header distribution.