+
+ template <class T, void (T::*callback)(Stream_event *)>
+ static SCM trampoline (SCM target, SCM event)
+ {
+ T *t = unsmob<T> (target);
+ LY_ASSERT_SMOB (T, target, 1);
+ LY_ASSERT_SMOB (Stream_event, event, 2);
+
+ t->protect_event (event);
+ (t->*callback) (unsmob<Stream_event> (event));
+ return SCM_UNSPECIFIED;
+ }
+
+ // Fallback for non-overriden callbacks for which &T::x degrades to
+ // &Translator::x
+ template <void (Translator::*)()>
+ static SCM
+ method_finder () { return SCM_UNDEFINED; }
+