X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-guile.cc;h=dbd2a90a5688f0944637af12875f2e1f1d35be4e;hb=38655bc28e73a0b218ba1582bdb84bab0fdfec4b;hp=d490e50f60c7347f51aec5e74ba7811f243e9eee;hpb=17912cfaa97a8c3159026435db295c055a977270;p=lilypond.git diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index d490e50f60..dbd2a90a56 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -25,6 +25,28 @@ #include "pitch.hh" #include "dimensions.hh" +#ifdef PARANOID +#include +#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) {