]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/smobs.hh
release: 1.3.59
[lilypond.git] / lily / include / smobs.hh
index 96343a9b95d179b3a06bc12792fbb7fd7dd380ac..dff21977b1af843a1261d758c3127e270b6f09ae 100644 (file)
        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 */