2 global-ctor.cc -- implement global constructors
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "global-ctor.hh"
14 static Array<Global_ctor> *ctor_global_statics_;
17 add_constructor (Global_ctor c)
19 if (!ctor_global_statics_)
20 ctor_global_statics_ = new Array<Global_ctor>;
21 ctor_global_statics_->push (c);
27 for (int i = 0; i < ctor_global_statics_->size (); i++)
28 (ctor_global_statics_->elem (i)) ();