* lily/context.cc (Context): unprotect key from ctor.
* lily/parser.yy (lilypond_header_body): copy previous
$globalheader if present.
* lily/ly-module.cc (LY_DEFINE): rename ly:import-module to
ly:module-copy
* scm/page-layout.scm (marked-up-headfoot): remove old functions.
* scm/titling.scm: remove old titling functions
* scm/page-layout.scm (marked-up-headfoot): create header/footer
field from user-supplied markup
* scm/titling.scm (marked-up-title): create title via
user-specified markup.
* lily/ly-module.cc (LY_DEFINE): use ly_module_lookup(). This does
not have side-effect of creating variable stub.
2004-11-21 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/grob.cc (Grob): idem. Plugs mem leaks.
+
+ * lily/context.cc (Context): unprotect key from ctor.
+
* scm/stencil.scm (stack-lines): return empty-stencil if argument
is '()
(stack-stencils): idem.
Object_key const*key = context->get_grob_key (name);
Item *it = new Item (props, key);
- scm_gc_unprotect_object (key->self_scm ());
dynamic_cast<Engraver*>(tr)->announce_grob (it, cause);
definition_ = SCM_EOL;
smobify_self ();
-
properties_scm_ = (new Scheme_hash_table)->self_scm ();
scm_gc_unprotect_object (properties_scm_);
+ scm_gc_unprotect_object (key_->self_scm ());
}
Object_key const *key = get_context_key (type, id);
Context * new_group
= cdef->instantiate (ops, key);
- scm_gc_unprotect_object (key->self_scm ());
new_group->id_string_ = id;
add_context (new_group);
Moment(0),
"Global", "", 0))
{
- scm_gc_unprotect_object (key_->self_scm());
-
output_def_ = o;
final_mom_ = final;
definition_ = find_context_def (o, ly_symbol2scm ("Global"));
Object_key const *key = get_context_key ("Score", "");
Context *c = t->instantiate (SCM_EOL, key);
add_context (c);
- scm_gc_unprotect_object (key->self_scm());
Score_context *sc = dynamic_cast<Score_context*> (c);
sc->prepare (w);
GC. After smobify_self (), they are. */
smobify_self ();
+ /*
+ We always get a new key object for a new grob.
+ */
+ scm_gc_unprotect_object (key_->self_scm ());
SCM meta = get_property ("meta");
if (scm_is_pair (meta))
{
set_columns (new Paper_column (nmp, key1), new Paper_column (pc, key2));
- scm_gc_unprotect_object (key1->self_scm());
- scm_gc_unprotect_object (key2->self_scm());
-
Grob_info i1;
i1.grob_ = command_column_;
i1.origin_trans_ = this;
Object_key const *sys_key = context()->get_grob_key ("System");
pscore_->typeset_line (new System (props, sys_key));
- scm_gc_unprotect_object (sys_key->self_scm ());
make_columns ();
system_ = pscore_->system_;
Object_key * key = new Lilypond_general_key (book_key, user_key_, 0);
SCM scm_key = key->self_scm();
+ scm_gc_unprotect_object (scm_key);
for (int i = 0; !i || i < outdef_count; i++)
{
(lambda (a b)
(< (object-address (car a))
(object-address (car b))))))
- (outfile (open-file (string-append
+ (out-file-name (string-append
"gcstat-" (number->string gc-protect-stat-count)
- ".scm"
- ) "w")))
+ ".scm"))
+ (outfile (open-file out-file-name "w")))
- (display "DUMPING...\n")
+ (display "Dumping gc protected objs to ...\n")
(display
(filter
(lambda (x) (not (symbol? x)))
(for-each
(lambda (f)
(catch 'ly-file-failed (lambda () (ly:parse-file f)) handler)
-;;; (dump-gc-protects)
+ (dump-gc-protects)
)
files)