Use scalar instead of embedded_scm for context mod overrides.
[lilypond/mpolesky.git] / lily / global-ctor.cc
blobadf15fd614dc5edce83b7b30995d0dc8a357152b
1 /*
2 global-ctor.cc -- implement global constructors
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "global-ctor.hh"
11 #include "std-vector.hh"
13 static vector<Global_ctor> *ctor_global_statics_;
15 void
16 add_constructor (Global_ctor c)
18 if (!ctor_global_statics_)
19 ctor_global_statics_ = new vector<Global_ctor>;
20 ctor_global_statics_->push_back (c);
23 void
24 call_constructors ()
26 for (vsize i = 0; i < ctor_global_statics_->size (); i++)
27 (ctor_global_statics_->at (i)) ();