]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/lily-guile.hh
* lily/accidental-placement.cc (split_accidentals): new function
[lilypond.git] / lily / include / lily-guile.hh
index 4930b4fec728e67a866f8e30018fff1bd13951a2..53328a23d715f14884f07532417eea7965e6dd04 100644 (file)
 
 #include "drul-array.hh"
 
-
-/* Guile 1.3.4 compatibility */
-#if GUILE_MINOR_VERSION < 4
-
-
-#ifndef SCM_CELL_TYPE
-#define SCM_CELL_TYPE(X) SCM_CAR (X)
-#endif
-
-#ifndef SCM_CELL_WORD_1
-#define SCM_CELL_WORD_1(X) SCM_CDR (X)
-#endif
-
-#define scm_bits_t SCM
-
-#define fix_guile_1_3_4_scm_puts(scm_data, port) scm_puts ((char*)scm_data, port)
-#define scm_puts(scm_data, port) fix_guile_1_3_4_scm_puts (scm_data, port)
-#endif
-
 /* Guile 1.4.x compatibility */
 #if GUILE_MINOR_VERSION < 5
 
 #define scm_set_current_module(x) (void)x
 #define scm_c_resolve_module(x) (SCM)0
 
+inline SCM scm_c_make_vector  (int k, SCM val) {
+  return scm_make_vector (SCM_MAKINUM (k), val);
+}
 #define scm_c_define_gsubr scm_make_gsubr
 #define scm_c_eval_string(str) gh_eval_str ((char*)str)
-#define scm_c_memq scm_sloppy_memq
+
 #define scm_gc_protect_object scm_protect_object
 #define scm_gc_unprotect_object scm_unprotect_object
 #define scm_list_n scm_listify
 #define SCM_STRING_LENGTH SCM_LENGTH
 #define SCM_SYMBOL_CHARS SCM_CHARS
 #define SCM_SYMBOL_LENGTH SCM_LENGTH
+#define SCM_VECTOR_LENGTH SCM_LENGTH
+
+#define SMOB_FREE_RETURN_VAL(CL) sizeof(CL) 
+#define scm_done_free(x) 
+#endif
+
+#ifndef SMOB_FREE_RETURN_VAL
+#define SMOB_FREE_RETURN_VAL(CL) 0
 #endif
 
 
+#if GUILE_MINOR_VERSION < 7
+#define scm_gc_unregister_collectable_memory(a,b,c) scm_done_free(b)
+#define scm_gc_register_collectable_memory(a,b,c) scm_done_malloc(b)
+#endif
+
 #include "direction.hh"
 #include "flower-proto.hh"
 
@@ -156,10 +153,9 @@ Offset ly_scm2offset (SCM);
 SCM ly_assoc_chain (SCM key, SCM achain);
 SCM ly_assoc_cdr (SCM key, SCM alist);
 Interval ly_scm2interval (SCM);
+Slice int_list_to_slice (SCM l);
 SCM ly_interval2scm (Drul_array<Real>);
 
-void taint (SCM *);
-
 
 SCM ly_parse_scm (char const* s, int* n);
 SCM ly_quote_scm (SCM s);
@@ -169,6 +165,8 @@ String print_scm_val (SCM val);
 SCM ly_number2string (SCM s);
 
 SCM parse_symbol_list (char const *);
+SCM robust_list_ref(int i, SCM l);
+
 
 inline SCM ly_cdr (SCM x) { return SCM_CDR (x); }
 inline SCM ly_car (SCM x) { return SCM_CAR (x); } 
@@ -221,8 +219,8 @@ bool to_boolean (SCM s);
 void init_ly_protection ();
 unsigned int ly_scm_hash (SCM s);
 
-SCM index_cell (SCM cellp, Direction d);
-SCM index_set_cell (SCM cellp, Direction d, SCM val);
+SCM index_get_cell (SCM cell, Direction d);
+SCM index_set_cell (SCM cell, Direction d, SCM val);