Since SCM_UNBNDP has problems with arguments of type Protected_scm, an
alternative member function seems like a viable alternative.
Protected_scm &operator = (Protected_scm const &);
operator const SCM & () const;
operator SCM & ();
+ bool is_bound () const; // SCM_UNBNDP balks at Protected_scm
};
#endif /* PROTECTED_SCM_HH */
return *SCM_CARLOC (object_);
}
+
+bool
+Protected_scm::is_bound () const
+{
+ if (SCM_CONSP (object_))
+ return !SCM_UNBNDP (SCM_CAR (object_));
+ return !SCM_UNBNDP (object_);
+}