summaryrefslogtreecommitdiff
path: root/libs/lua
AgeCommit message (Collapse)Author
2020-03-02Fix some doxygen warningsRobin Gareus
2020-02-06Lua Array, assert indices > 0Robin Gareus
2020-02-06Extend Lua binding for static methodsRobin Gareus
This add support for Lua bindings for static member functions in weak/share ptr class bindings.
2020-01-14NO-OP: whitespaceRobin Gareus
2019-12-01Add Lua typecast from C++ vector to C-ArrayRobin Gareus
This is useful for MIDI bytes amongst other things
2019-10-29Customize Lua GC, add object-memory-lock API.Robin Gareus
Add custom API to prevent Lua Objects from being garbage collected. This is intended to for Ardour LuaBridge bindings (~1MB Objects: tables, functions and userdata). The bindings are persistent and the gc can skip them in mark & sweep phases. This is a significant performance improvement for garbage collection. Note. The next version of Lua (5.4) will come with a generational-gc rather than an incremental, so extending the API at this point in time is acceptable.
2019-10-29Update Lua to upstream 5.3.5Robin Gareus
2019-08-03Update core library GPL boilerplate and (C) from git logRobin Gareus
2019-05-17Fix std::list<hared_ptr<>> front/back methodsRobin Gareus
Shared pointer reference accessors can't be const
2019-04-12Special case Lua copy-construction of trackable instancesRobin Gareus
This fixes an crashing issue with ArdourUI.SelectionList a bug introduced in 6dc3bdf252c and 35dcd46d7d. Since removal of the special cases in 35dcd46d7d, when using a C-pointer in a std::list<>, std::list<class*>::push_back(TypeListValue) TypeListValues<>'s Head was expanded to "class*& const" implied by void ::push_back(const T& value); This resulted in lifetime issues with a classes that derive from sigc::trackable (e.g. Ardour's Selection). The reference leaves scope and isn't duplicated when it is pushed back to the std::list<>. The script scripts/select_every_2nd_region.lua crashed because entries in the SelectionList were no longer valid. Previously (before 6dc3bdf252c) TypeListValues explicitly copy-constructed the value to work around the lifetime issue. This new solution bypasses the issue by directly using the c-pointer without dereferencing it.
2018-10-14remove use of hardcoded -fPIC compiler flag, and use compiler flag dict insteadPaul Davis
2018-09-30Adapt our remaining MSVC projects for 'boost::atomic' (in case it later gets ↵John Emmas
extended to the other libs) Stage 1 of 3 (more to follow)
2018-09-10Initial changes needed for building Mixbus (with MSVC) as version 5John Emmas
(Mixbus itself will probably need extra changes)
2018-03-19Customize Lua GC, add object-memory-lock API.Robin Gareus
Add custom API to prevent Lua Objects from being garbage collected. This is intended to for Ardour LuaBridge bindings (~1MB Objects: tables, functions and userdata). The bindings are persistent and the gc can skip them in mark & sweep phases. This is a significant performance improvement for garbage collection. Note. The next version of Lua (5.4) will come with a generational-gc rather than an incremental, so extending the API at this point in time is acceptable.
2018-03-06Allow loadfile in non-rt scriptsRobin Gareus
2018-02-15When building with MSVC, allow for the fact that Mixbus and Ardour can be ↵John Emmas
using different versions of the SESSION_FILE format
2018-02-14Accommodate the change from libtimecode to libtemporalJohn Emmas
2017-11-29Tweak Lua GCRobin Gareus
2017-11-29update to lua-5.3.4Robin Gareus
2017-08-18Add luaRef is BooleanRobin Gareus
2017-08-10Centralize Lua sandboxingRobin Gareus
2017-03-30Fix hiding Lua __metatable -- prevent setmetatable() overrideRobin Gareus
2017-03-30Lua: make external (static) functions available for const objects.Robin Gareus
This fixes iterators on const std::lists<>& and const std::map<>&
2017-03-22Special case const std::string& Lua binding.Robin Gareus
since 6dc3bdf, a const string reference would leave scope with Lua code fn("text") calling a C++ fn (const std::string&) before the C++ function is called.
2017-03-22remove cruft (following 6dc3bdf)Robin Gareus
2017-03-18Fix LuaBindings TypeList copy-ctorRobin Gareus
Determining the class type copy constructed references. Const-references passed to C++ functions were copies.
2017-03-18Make Lua std::set bindings more generic, (prepare for multiset etc)Robin Gareus
2017-03-16drop lua documentation for deprecated "sameinstance()"Robin Gareus
2017-03-16Lua: provide instance-equal check as '==' comparator.Robin Gareus
This deprecated explicit the "sameinstance()" method
2017-02-23LuaBridge: Dedicated type for pointer-lists and const versionRobin Gareus
"class C*" cannot be defined nor resolved, so STL containers to class instance pointers need to be special-cased.
2017-02-23luaBridge support const references to class-instance pointersRobin Gareus
Support passing "T*" as as "const T* &" argument e.g. std::list<T*>::push_back ( const T* & )
2017-02-20Add Lua bindings for std::list ::front() and ::back()Robin Gareus
2017-02-14Fix lua-doc (Null pointer c'tor doc)Robin Gareus
2017-01-21Lua add an Empty/Nil shared-pointer constructorRobin Gareus
2017-01-21LuaBindings: prefer shared_ptr over weak_ptrRobin Gareus
2017-01-20Allow Lua bindings up to 10 argsRobin Gareus
2017-01-08Fix shared-pointer list creation from LuaRobin Gareus
2016-10-07Lua binding for std::map<>::at()Robin Gareus
2016-08-30Update our MSVC project files to generate the most recent Ardour session ↵John Emmas
file format (ver 5) rather than the older v3 format
2016-08-27fix copy/paste typo in 1d7c14496Robin Gareus
2016-08-26allow to access data-members in weak/shared ptr classesRobin Gareus
2016-08-26add "sameinstance()" lua binding for all shared/weak ptrsRobin Gareus
2016-08-26tweak lua GC (once again)Robin Gareus
fixes OOM with extreme automation in HP/LP.
2016-08-16extend lua-doc to show propertiesRobin Gareus
2016-08-15Re-enable luabridge addProperty()Robin Gareus
In preparation to expose ARDOUR::SessionConfiguration. Also change the return-type to bool to match Ardour's set/get API
2016-07-18rework lua-bridge C++ variable referencesRobin Gareus
Since lua functions are closures, C++ methods that pass arguments by reference cannot be used directly. The previous approach (boost::ref) failed with clang. Assume the following: void foo (float&) { } static inline float& bar () { boost::reference_wrapper<float> r (42); return r.get (); } foo ( bar () ); With gcc, "r" goes out of scope after foo's arguments are processed and all is well. But with clang, "r" already leave scope when *inlined* bar() returns. Solution: allocate some user-data on the lua-stack to hold the reference. There is no reference to this user-data so lua will eventually garbage collect it. (theoretically, creating the table which holds the return-values could trigger an emergency garbage collection when memory is low and free the reference just while they're being pushed to the table, then gain FuncArgs<Params> already dereferenced them all as variable on the C stack -- probably again compiler specific)
2016-07-18amend previous commit (forgotten checkin)Robin Gareus
2016-07-18update to lua-5.3.3Robin Gareus
2016-07-07prepare sharing C++ class instances across lua-interpretersRobin Gareus
in particular: lua-lifefime (!) C++ instances. This allows for dynamic allocation of custom user-data, bound to the lifetime of the allocating lua-context.
2016-07-06tweak lua gcRobin Gareus
lua C++ bindings require ~400KB worth of tables now; so bump memory available to rt-safe scripts (full interpreter) to 2MB. Also switch to incremental GC.