objects.
* lily/include/lily-parser.hh (class Lily_parser): remove beam_check().
2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/include/lily-guile-macros.hh: don't protect exported module
+ objects.
+
+ * lily/include/lily-parser.hh (class Lily_parser): remove beam_check().
+
* scm/backend-library.scm (postscript->pdf): use
delete-intermediate-files iso. running-from-gui?
/*
TODO: rename me to ly_c_lily_module_eval
+
+ we don't have to protect the result; it's already part of the
+ exports list of the module.
*/
+
#define ly_lily_module_constant(x) \
({ \
static SCM cached; \
if (__builtin_constant_p ((x))) \
{ \
if (!cached) \
- value = cached = scm_gc_protect_object (scm_eval (scm_str2symbol (x), \
- global_lily_module)); \
+ value = cached = scm_eval (scm_str2symbol (x), \
+ global_lily_module); \
} \
else \
value = scm_eval (scm_str2symbol (x), global_lily_module); \
int fatal_error_;
int error_level_;
bool ignore_version_b_;
- SCM last_beam_start_;
Lily_parser (Sources *sources);
Lily_parser (Lily_parser const &);
DECLARE_SCHEME_CALLBACK (layout_description, ());
- void beam_check (SCM);
void do_init_file ();
void do_yyparse ();
void parse_file (String init, String name, String out_name);
sources_ = sources;
default_duration_ = Duration (2, 0);
error_level_ = 0;
- last_beam_start_ = SCM_EOL;
smobify_self ();
}
sources_ = src.sources_;
default_duration_ = src.default_duration_;
error_level_ = src.error_level_;
- last_beam_start_ = src.last_beam_start_;
smobify_self ();
if (src.lexer_)
{
Duration dd = THIS->default_duration_;
$$ = dd.smobbed_copy ();
-
- THIS->beam_check ($$);
}
| multiplied_duration {
$$ = $1;
THIS->default_duration_ = *unsmob_duration ($$);
-
- THIS->beam_check ($$);
}
;
}
-/* FIXME: Should make this optional? It will also complain at
-
- [s4]
-
-which is entirely legitimate.
-
-Or we can scrap it. Barchecks should detect wrong durations, and
-skipTypesetting speeds it up a lot. */
-
-void
-Lily_parser::beam_check (SCM dur)
-{
- Duration *d = unsmob_duration (dur);
- if (unsmob_music (last_beam_start_) && d->duration_log () <= 2)
- {
- Music *m = unsmob_music (last_beam_start_);
- m->origin ()->warning (_f ("suspect duration in beam: %s",
- d->to_string ()));
- }
- last_beam_start_ = SCM_EOL;
-}
-
Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*)
{
assert (unsmob (s));
- char str[1000];
- sprintf (str, "#<Scheme_hash_table 0x%0lx ", SCM_UNPACK (s));
+ scm_puts ("#<Scheme_hash_table ", p);
Scheme_hash_table *me = (Scheme_hash_table *) SCM_CELL_WORD_1 (s);
scm_display (me->hash_tab_, p);
scm_puts ("> ", p);
(lambda () (ly:parse-file file-name))
(lambda (x . args) (handler x file-name)))
- (if #f
+ (if #t
(dump-gc-protects)))
(use-modules (scm editor))