- Music_output * output = trans_p->get_output_p();
- scm_unprotect_object (trans_p->self_scm ());
-
- if(verbose_global_b)
- progress_indication (_f ("elapsed time: %.2f seconds", timer.read ()));
-
- if (!header_p_)
- header_p_ = new Scheme_hash_table; // ugh
- Scope bla (header_p_);
- output->header_l_ = &bla;
- output->origin_str_ = location_str();
-
- progress_indication ("\n");
- output->process();
- delete output ;
-
- /*
- force GC. At this point, GUILE may give back mallocated area to
- the system.
- */
-
- scm_gc();
+ for (vsize i = 0, n = s.defs_.size (); i < n; i++)
+ {
+ Output_def *copy = s.defs_[i]->clone ();
+ defs_.push_back (copy);
+ copy->unprotect ();
+ }
+ header_ = ly_make_anonymous_module (false);
+ if (ly_is_module (s.header_))
+ ly_module_copy (header_, s.header_);