#ifndef LY_SMOBS_ICC
#define LY_SMOBS_ICC
+#ifndef SCM_PACK
+#define SCM_PACK(x) ((SCM) x)
+#endif
+
#define IMPLEMENT_UNSMOB(CL, name) \
CL * \
unsmob_ ## name ( SCM s) \
\
SCM_NEWCELL(s); \
SCM_SETCAR(s,CL::smob_tag_); \
- void * me_p = cl; \
- SCM_SETCDR(s,me_p); \
+ SCM me_s = SCM_PACK (cl); \
+ SCM_SETCDR (s, me_s); \
return s;\
}\
SCM s = self_scm_; \
scm_unprotect_object (s); \
\
- SCM_CAR(self_scm_) = SCM_EOL; \
- SCM_CDR(self_scm_) = SCM_EOL; \
+ SCM_SETCAR (self_scm_, SCM_EOL); \
+ SCM_SETCDR (self_scm_, SCM_EOL); \
self_scm_ = SCM_EOL; \
\
scm_done_malloc ( - sizeof (CL));\
\
/* no need to call scm_unprotect_object, since this call \
implies that the object is not protected. */ \
- SCM_CAR(ses) = SCM_EOL;\
+ SCM_SETCAR (ses, SCM_EOL); \
delete s;\
return sizeof (CL);\
} \