X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fglobal-ctor.hh;h=d15f28e93444ecdedad82a5b0d7c30f118d40c61;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=de31fc8dc9586ac5406d494caedfff47391bf668;hpb=7e72a1e50e94a7f9738d62599de79fe7745f600c;p=lilypond.git diff --git a/lily/include/global-ctor.hh b/lily/include/global-ctor.hh index de31fc8dc9..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--2004 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 ();