summaryrefslogtreecommitdiff
path: root/libs/lua
AgeCommit message (Collapse)Author
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.
2016-06-26Use correct type of std::map::countSam Thursfield
Compiling Ardour commit ec8a4de01596c162c1529f3021dfc432bf66dfe8 with GCC 6.1.1 (on Fedora 24) gave this build failure: In file included from /home/sam/ardour/libs/lua/LuaBridge/LuaBridge.h:154:0, from ../tools/luadevel/devel.cc:16: /home/sam/ardour/libs/lua/LuaBridge/detail/Namespace.h: In instantiation of ‘luabridge::Namespace::Class<std::map<K, V> > luabridge::Namespace::beginStdMap(const char*) [with K = std::__cxx11::basic_string<char>; V = std::__cxx11::basic_string<char>]’: ../tools/luadevel/devel.cc:89:60: required from here /home/sam/ardour/libs/lua/LuaBridge/detail/Namespace.h:1666:30: error: no matches converting function ‘count’ to type ‘void (class std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > >::*)()’ .addFunction ("count", (void (LT::*)())&LT::count) ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/6.1.1/map:61:0, from /home/sam/ardour/libs/lua/LuaBridge/LuaBridge.h:45, from ../tools/luadevel/devel.cc:16: /usr/include/c++/6.1.1/bits/stl_map.h:1131:2: note: candidates are: template<class _Kt> decltype (((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::count(const _Kt&) const [with _Kt = _Kt; _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >] count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) ^~~~~ /usr/include/c++/6.1.1/bits/stl_map.h:1125:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::count(const key_type&) const [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::__cxx11::basic_string<char>] count(const key_type& __x) const ^~~~~ Casting std::map::count to the correct type instead of a fake void() type fixes the compile failure.
2016-06-01add lua/C++ dynamic_cast<>Robin Gareus
2016-05-31allow lua binding functions with up to 9 parametersRobin Gareus
e.g new_midi_track()
2016-05-21allow lua to access array at an offsetRobin Gareus
2016-04-14allow to compare C class instances from luaRobin Gareus
2016-04-12Modify 'getIdentityKey()' function to have LuaBridge_API linkage when ↵John Emmas
building with MSVC (rather than simply 'extern')
2016-04-12Change LuaBridge_API to be __declspec(dllexport) or __declspec(dllimport, as ↵John Emmas
required
2016-04-12some more windows bandaids for optimized buildsRobin Gareus
really this is getting UGLY.
2016-04-11special case luabridge for windows/MSVCRobin Gareus
luabridge uses static fn addresses to identify classes. Windows uses different addresses for *identical* static functions in libardour.dll and ardour.exe This solves the issue by moving the all functions from a header-only implementation into libardour.
2016-04-10update lua related doc, add missing bindingsRobin Gareus
2016-04-04Modify our MSVC projects to build liblua as a DLL rather than a static libJohn Emmas
2016-04-04#define LUA_DEBUG when making a Debug build with MSVCJohn Emmas
2016-04-04liblua visibility and compiler-flagsRobin Gareus
2016-03-28reduce header dependencies (part 1/2)Robin Gareus
2016-03-23refactor lua header includesRobin Gareus
2016-03-21Lua Array DocumentationRobin Gareus
2016-03-21refine Lua Binding DocumentationRobin Gareus
2016-03-20fix JSON luadoc formatRobin Gareus
2016-03-20Prepare Lua Binding Documentation (JSON)Robin Gareus
2016-03-18allow to bind functions with reference args in global lua namespaceRobin Gareus
2016-02-27ISO C++03 14.2/4 compatibility for clang.Robin Gareus
http://stackoverflow.com/questions/3786360/confusing-template-error (hopefully other compilers which didn't mind the missing "template" are still fine with this)
2016-02-27Accommodate newly introduced source(s) in our MSVC project (lua)John Emmas
2016-02-22Add a VC project for building the new lua branch with MSVCRobin Gareus
(untested, new paths -- adopted from John Emmas project)
2016-02-22LuaBridge: support argument references via table returnRobin Gareus
2016-02-22customize LuaBridgeRobin Gareus
* introduce boost::shared_ptr support * support enum & const * allow to add non-class member functions * STL iterators (vector, list, set, bitset & map) * support reference arguments (framecnt_t&) * add support for arrays of basic types (e.g. float*, int*) * fix compiler warnings
2016-02-22add liblua wrapper and build-scriptsRobin Gareus
2016-02-22NO-OP whitespaceRobin Gareus
2016-02-22add LuaBridgeRobin Gareus
https://github.com/vinniefalco/LuaBridge
2016-02-22add lua-5.3.2Robin Gareus