]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/lily-guile-macros.hh: don't protect exported module
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 9 Jun 2005 18:05:31 +0000 (18:05 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 9 Jun 2005 18:05:31 +0000 (18:05 +0000)
objects.

* lily/include/lily-parser.hh (class Lily_parser): remove beam_check().

ChangeLog
lily/include/lily-guile-macros.hh
lily/include/lily-parser.hh
lily/lily-parser.cc
lily/parser.yy
lily/scm-hash.cc
scm/lily.scm

index f6269944f8f5e0a056084c004d7acb0ca5157274..a1bc28ea7718fda2465da6737713290c285e098b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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? 
 
index 2138038481f9262fe2fbe49e2206bf5b14a172a1..3a2f63e47c3dad1bea8a9b5436e08a2373027aaf 100644 (file)
@@ -55,7 +55,11 @@ inline SCM ly_symbol2scm (char const *x) { return scm_str2symbol ((x)); }
 
 /*
   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;                                                 \
@@ -64,8 +68,8 @@ inline SCM ly_symbol2scm (char const *x) { return scm_str2symbol ((x)); }
     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);       \
index 2f8810b37beb91954223226774db7252d0be1027..96f46d4a6f5fc7ad06e4e97740489930f5b13f90 100644 (file)
@@ -47,14 +47,12 @@ public:
   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);
index cef4ed683615c88fa8c617b5e96e3acbf8669afb..1c284b4138f71989dbebe8bd9ab60a1b0e2c1e73 100644 (file)
@@ -31,7 +31,6 @@ Lily_parser::Lily_parser (Sources *sources)
   sources_ = sources;
   default_duration_ = Duration (2, 0);
   error_level_ = 0;
-  last_beam_start_ = SCM_EOL;
 
   smobify_self ();
 }
@@ -44,7 +43,6 @@ Lily_parser::Lily_parser (Lily_parser const &src)
   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_)
index 9cfa833ddf5173fc66a3e5077ae25c6b80847510..4d73b39b5d692fb28960868ba16f3ba68d3b57a1 100644 (file)
@@ -2097,14 +2097,10 @@ optional_notemode_duration:
        {
                Duration dd = THIS->default_duration_;
                $$ = dd.smobbed_copy ();
-
-               THIS->beam_check ($$);
        }
        | multiplied_duration   {
                $$ = $1;
                THIS->default_duration_ = *unsmob_duration ($$);
-
-               THIS->beam_check ($$);
        }
        ;
 
@@ -2665,28 +2661,6 @@ Lily_parser::do_yyparse ()
 }
 
 
-/* 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;
-}
-
 
 
 
index f59adc010448567bb9af559c34473da6fe507938..86af9a6d030bf7a95e7718991db58597bd37e836 100644 (file)
@@ -76,8 +76,7 @@ int
 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);
index 4a3da324e5a0445e95171570f500c7765187b201..abf238871a2a395a8ec4b6e0debdd92af66614dc 100644 (file)
@@ -326,7 +326,7 @@ The syntax is the same as `define*-public'."
         (lambda () (ly:parse-file file-name))
         (lambda (x . args) (handler x file-name)))
 
-  (if #f
+  (if #t
       (dump-gc-protects)))
 
 (use-modules (scm editor))