]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-guile.cc
* Documentation/windows/zlily-profile.sh:
[lilypond.git] / lily / lily-guile.cc
index ac8bc5fd3bdc5121fd639ecfdae60c7fc14f292c..dbd2a90a5688f0944637af12875f2e1f1d35be4e 100644 (file)
 #include "pitch.hh"
 #include "dimensions.hh"
 
+#ifdef PARANOID
+#include <libguile/gc.h>
+#undef gh_pair_p
+bool
+ly_pair_p (SCM x)
+{
+#if 0
+  assert (!SCM_CONSP (x) || (*(scm_t_bits*) SCM2PTR (SCM_CAR (x))) != scm_tc_free_cell);
+  assert (!SCM_CONSP (x) || (*(scm_t_bits*) SCM2PTR (SCM_CDR (x))) != scm_tc_free_cell);
+#elif GUILE_MINOR_VERSION < 5
+  assert (!SCM_CONSP (x) || !SCM_FREEP (SCM_CAR (x)));
+  assert (!SCM_CONSP (x) || !SCM_FREEP (SCM_CDR (x)));
+#else
+  assert (!SCM_CONSP (x) || !SCM_FREE_CELL_P (SCM_CAR (x)));
+  assert (!SCM_CONSP (x) || !SCM_FREE_CELL_P (SCM_CDR (x)));
+#endif  
+  //return SCM_NFALSEP (scm_pair_p (x));
+  return gh_pair_p (x); 
+}
+#define gh_pair_p ly_pair_p
+#endif
+
 SCM
 ly_last (SCM list)
 {
@@ -162,7 +184,10 @@ file is looked up using the lilypond search path.
 /**
    Read a file, and shove it down GUILE.  GUILE also has file read
    functions, but you can't fiddle with the path of those.
- */
+
+
+   TODO: JUNKME.
+*/
 void
 read_lily_scm_file (String fn)
 {