]> git.donarmstrong.com Git - lilypond.git/blob - lily/global-ctor.cc
(Paper_column): copy rank_. This fixes
[lilypond.git] / lily / global-ctor.cc
1 /*   
2   global-ctor.cc --  implement global constructors
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "global-ctor.hh"
11
12 #include "array.hh"
13
14 static Array<Global_ctor> *ctor_global_statics_;
15
16 void
17 add_constructor (Global_ctor c)
18 {
19   if (!ctor_global_statics_)
20     ctor_global_statics_ = new Array<Global_ctor>;
21   ctor_global_statics_->push (c);
22 }
23
24 void
25 call_constructors ()
26 {
27   for (int i= 0; i < ctor_global_statics_->size (); i++)
28     (ctor_global_statics_->elem (i)) ();
29 }