2 global-ctor.hh -- declare Global construction stuff.
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef GLOBAL_CTOR_HH
11 #define GLOBAL_CTOR_HH
14 #define ADD_GLOBAL_CTOR_WITHNAME(y, x)\
15 class Global_ctor_ ## y \
18 Global_ctor_ ## y () { \
19 add_constructor (x); \
21 } _ ## y ## _ctor_init; \
24 #define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME (x, x);
27 typedef void (* Global_ctor ) ();
28 void add_constructor (Global_ctor ctor);
29 void call_constructors ();
31 #endif /* GLOBAL_CTOR_HH */