]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/scm-hash.cc
release: 1.5.29
[lilypond.git] / lily / scm-hash.cc
index b8bc8d8d03a28577e4fcecda3ca6b57286eea00d..a8d0488002c7643a209eefbc095096a1f3d96ef2 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 #include <stdio.h>
@@ -14,7 +14,7 @@
 void
 copy_scm_hashes (SCM dest, SCM src)
 {
-  for (int i = SCM_LENGTH(src); i--;)
+  for (int i = SCM_SYMBOL_LENGTH (src); i--;)
     for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p(s); s = ly_cdr (s))
       {
        scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s));
@@ -67,10 +67,10 @@ 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));
-   Scheme_hash_table *me = (Scheme_hash_table*) SCM_CELL_WORD_1 (s);
-   scm_display (me->hash_tab_, p);      
-   scm_puts ("> ",p);        
-   return 1;
+  Scheme_hash_table *me = (Scheme_hash_table*) SCM_CELL_WORD_1 (s);
+  scm_display (me->hash_tab_, p);      
+  scm_puts ("> ",p);        
+  return 1;
 }
 
 bool
@@ -108,7 +108,7 @@ Scheme_hash_table::set (SCM k, SCM v)
   /*
     resize if getting too large.
   */
-  if (elt_count_ > 2 * SCM_LENGTH (hash_tab_))
+  if (elt_count_ > 2 * SCM_SYMBOL_LENGTH (hash_tab_))
     {
       SCM nh = scm_make_vector (gh_int2scm (3* elt_count_+1), SCM_EOL);
       copy_scm_hashes (nh, hash_tab_);
@@ -142,7 +142,7 @@ SCM
 Scheme_hash_table::to_alist () const
 {
   SCM l = SCM_EOL;
-  for (int i = SCM_LENGTH(hash_tab_); i--;)
+  for (int i = SCM_SYMBOL_LENGTH (hash_tab_); i--;)
     for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p(s); s = ly_cdr (s))
       {
        l = scm_acons (ly_caar (s), ly_cdar (s), l);
@@ -153,7 +153,7 @@ Scheme_hash_table::to_alist () const
 
 
 
-IMPLEMENT_UNSMOB (Scheme_hash_table,scheme_hash);
+
 IMPLEMENT_SMOBS (Scheme_hash_table);
 IMPLEMENT_DEFAULT_EQUAL_P (Scheme_hash_table);