Lua-API++
2015-02-12-3
Lua-API++ library
|
Additional library features can be configured with special macros. These macros must be defined project-wide to maintain consistency.
LUAPP_COMPATIBILITY_V51
; LUAPP_COMPATIBILITY_V52
; LUAPP_COMPATIBILITY_V53
. The macro LUAPP_COMPATIBILITY_NO_NRVO
disables tests that require NRVO compiler capability. Also it disables the getUpvalues method that requires NRVO too.
Operation that produces temporary Lua value may be skipped if the operation result is never used. Such operation is called "discardable". The non-discardable operations are executed no matter what happens to results.
By default, only function calls are non-discardable, but it is possible to switch this mode for:
LUAPP_NONDISCARDABLE_INDEX
; LUAPP_NONDISCARDABLE_ARITHMETICS
; LUAPP_NONDISCARDABLE_CONCAT
; LUAPP_NONDISCARDABLE_ALL
.To achieve best performance, API-dependent part may be included in headers as a set of inline functions. This mode can be used when link-time code generation is not available and the performance is crucial.
It is turned on with LUAPP_HEADER_ONLY
macro and impl.cpp no longer needs to be included. Note that in this mode all Lua API functions will be exposed to your source.
The LUAPP_WATCH_STACK
enables special mode of stack integrity checking at the exense of some operational overhead. In this mode, when the correct sequence of stack operations is broken, non-catchable exceptions will be raised, leading to immediate program termination.
This mode is recommended for debug purposes only.