aboutsummaryrefslogtreecommitdiff
path: root/sherlock.h
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-07-16 10:07:27 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-07-16 10:07:27 +0200
commite88b4e41114168047b652d425f0eb5fbfc99e4d0 (patch)
treee3dceb48cfd03a44c6d8ab26226df00759dae59b /sherlock.h
parente2d362e0da0e86f2fb85cf88a26cd223e28a8260 (diff)
downloadsherlock.lv2-e88b4e41114168047b652d425f0eb5fbfc99e4d0.tar.xz
move LV2_ATOM_TUPLE_FOREACH fix to main header.
Diffstat (limited to 'sherlock.h')
-rw-r--r--sherlock.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sherlock.h b/sherlock.h
index d551d5b..8626151 100644
--- a/sherlock.h
+++ b/sherlock.h
@@ -113,4 +113,13 @@ static const props_def_t stat_follow = {
.mode = PROP_MODE_STATIC
};
+// there is a bug in LV2 <= 0.10
+#if defined(LV2_ATOM_TUPLE_FOREACH)
+# undef LV2_ATOM_TUPLE_FOREACH
+# define LV2_ATOM_TUPLE_FOREACH(tuple, iter) \
+ for (LV2_Atom* (iter) = lv2_atom_tuple_begin(tuple); \
+ !lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), (tuple)->atom.size, (iter)); \
+ (iter) = lv2_atom_tuple_next(iter))
+#endif
+
#endif // _SHERLOCK_LV2_H