From: fred Date: Tue, 26 Mar 2002 22:47:50 +0000 (+0000) Subject: lilypond-1.3.59 X-Git-Tag: release/1.5.59~1779 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=12fd0af5044ad28ec22d3e3ef58138bd9996615d;p=lilypond.git lilypond-1.3.59 --- diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh index 96343a9b95..dff21977b1 100644 --- a/lily/include/smobs.hh +++ b/lily/include/smobs.hh @@ -40,12 +40,20 @@ SCM self_scm_; +#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 + /** Check if S is of the specified C++ class. */ -#define SMOB_IS_TYPE_B(TYPE, S) (SCM_NIMP((S)) && SCM_CAR((S)) == TYPE::smob_tag_) +#define SMOB_IS_TYPE_B(TYPE, S) (SCM_NIMP(S) && SCM_CELL_TYPE(S) == TYPE::smob_tag_) /// Cast S. No checks are done. -#define SMOB_TO_TYPE(TYPE, S) ((TYPE*) SCM_CDR((S))) +#define SMOB_TO_TYPE(TYPE, S) ((TYPE*) SCM_CELL_WORD_1(S)) #endif /* SMOBS_HH */