13
0
Go to file
Robin Gareus 520dcf8cdf rework lua-bridge C++ variable references
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-18 23:52:40 +02:00
cfgtool
doc
export
gtk2_ardour move show_gdk_event_state() utility function from gtk2_ardour to libs/gtkmm2ext 2016-07-18 14:41:25 -04:00
headless
libs rework lua-bridge C++ variable references 2016-07-18 23:52:40 +02:00
mcp
midi_maps
msvc_extra_headers
MSVCardour3 Remove 'i18n.h' from some VC projects where it's no longer needed 2016-07-18 09:41:46 +01:00
MSVCMixbus3
MSVCvst_scan
patches
patchfiles
scripts Optimize a-HiAndLowPass 2016-07-18 15:05:50 +02:00
session_utils Normalize API rename part 2 2016-07-18 17:37:13 +02:00
templates
tools correctly package color theme files for both linux and OS X 2016-07-18 11:50:38 -04:00
vst fix vamp path: 2016-06-25 00:44:04 +02:00
.dir-locals.el
.gitattributes disable git-archive 2016-07-06 03:12:19 +02:00
.gitignore
ardour-3.ttl
ardour.1
ardour.1.es
ardour.1.fr
ardour.1.ru
COPYING
foo.cc
instant.xml
instant.xml.sae
Makefile
msvc32-fixup.pl When building with MSVC, adapt the various font sizes to be a closer match to the GCC build 2016-06-23 15:20:03 +01:00
PACKAGER_README
README
system_config
testfile.flac
testfile.ogg
TRANSLATORS Fix the reference to i18n_po, fix Paul's second name 2016-06-10 20:28:43 +02:00
waf
wscript a-reverb prototype (based on setBfree b_reverb) 2016-07-12 16:43:10 +02:00

Please see the Ardour web site at http://ardour.org/ for all documentation..

For information on building ardour: 
      
     http://ardour.org/development.html