X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fglobal-ctor.hh;h=d15f28e93444ecdedad82a5b0d7c30f118d40c61;hb=38c30df0ef4153793a253adcd8e9eb93926da82d;hp=a0cf2393497855afd58f15388d6f53d5a231cdfe;hpb=ad7defd5f5a3d0151a711555c2d680c56ef559c7;p=lilypond.git diff --git a/lily/include/global-ctor.hh b/lily/include/global-ctor.hh index a0cf239349..d15f28e934 100644 --- a/lily/include/global-ctor.hh +++ b/lily/include/global-ctor.hh @@ -1,30 +1,28 @@ -/* +/* global-ctor.hh -- declare Global construction stuff. - + source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ + + (c) 1999--2008 Han-Wen Nienhuys +*/ #ifndef GLOBAL_CTOR_HH #define GLOBAL_CTOR_HH +#define ADD_GLOBAL_CTOR_WITHNAME(y, x) \ + class Global_ctor_ ## y \ + { \ + public: \ + Global_ctor_ ## y () \ + { \ + add_constructor (x); \ + } \ + } \ + _ ## y ## _ctor_init; -#define ADD_GLOBAL_CTOR_WITHNAME(y,x)\ -class Global_ctor_ ## y \ -{\ -public: \ - Global_ctor_ ## y () { \ - add_constructor (x); \ - } \ -} _ ## y ## _ctor_init; \ - - -#define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME(x,x); - +#define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME (x, x); -typedef void (* Global_ctor ) (); +typedef void (* Global_ctor) (); void add_constructor (Global_ctor ctor); void call_constructors ();