ardour/libs
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
..
appleutility replicate the remove-all-trailing whitespace commit(s) in master 2016-02-22 15:31:24 -05:00
ardour stop using Gestalt() on OS X (deprecated and no longer operating correctly) 2016-07-18 15:56:28 -04:00
ardouralsautil prepare for update to waf 1.8 2016-02-28 21:16:44 +01:00
audiographer fix build of test suite 2016-07-17 17:04:35 +01:00
backends enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
canvas Remove 'i18n.h' from some VC projects where it's no longer needed 2016-07-18 09:41:46 +01:00
clearlooks-newer Accommodate the fact that 'msvc_resources.rc.in' got moved to a new path 2016-05-21 10:33:18 +01:00
clearlooks-older NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
evoral enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
fst more hot wine. 2015-12-17 20:22:02 +01:00
gtkmm2ext fix a compile of annoying compiler warnings with elcap clang 2016-07-18 14:42:34 -04:00
libltc update libltc to v1.1.4-4-gb034a23 (endianess issue) 2015-09-09 16:54:26 +02:00
lua rework lua-bridge C++ variable references 2016-07-18 23:52:40 +02:00
midi++2 Enable build for FreeBSD (part 1/2) 2016-06-26 16:43:07 +02:00
panners enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
pbd add exception handling in LocaleGuard, to try to cover more OS X wierd/corner cases 2016-07-18 10:56:43 -04:00
plugins clean up a-comp, remove old prototype UI 2016-07-14 21:41:16 +02:00
ptformat Enable build for FreeBSD (part 1/2) 2016-06-26 16:43:07 +02:00
qm-dsp fix Vamp Onset Detector. 2015-10-08 16:18:39 +02:00
surfaces OSC: Get rid of meter noise in MB. 2016-07-18 09:47:33 -07:00
timecode Accommodate the fact that 'msvc_resources.rc.in' got moved to a new path 2016-05-21 10:33:18 +01:00
vamp-plugins remove misspelled unused define 2016-05-23 02:29:55 +02:00
vfork silence clang analyzer: Memory Error, Memory leak 2016-02-28 13:12:40 +01:00