|
From: | Neil Jerram |
Subject: | Re: Critical section review |
Date: | Thu, 24 Mar 2005 07:30:29 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 |
Marius Vollmer wrote:
The definition of SCM_NEWSMOB is correct; its prototype is SCM SCM_NEWSMOB (scm_t_bits tag, scm_t_bits data);
In this case, why does the implementation of SCM_NEWSMOB need a cast? Surely this cast is likely to hide bad uses of SCM_NEWSMOB.
However, if you want to use a SCM value as the data of a smob, you need to use SCM_UNPACK to convert that SCM into a scm_t_bits: SCM_RETURN_NEWSMOB (scm_tc16_memoized, SCM_UNPACK (scm_cons (exp, env)));
OK, I've done this now, although I think it would be more convenient to move the SCM_UNPACK into the definition of SCM_RETURN_NEWSMOB.
Neil
[Prev in Thread] | Current Thread | [Next in Thread] |