[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Critical section review

From: Marius Vollmer
Subject: Re: Critical section review
Date: Wed, 23 Mar 2005 22:34:56 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Neil Jerram <address@hidden> writes:

> Thanks.  So this is now just:
>    SCM_RETURN_NEWSMOB (scm_tc16_memoized, scm_cons (exp, env));
> which is a completely mechanical change except that one
> SCM_UNPACK(...) has become ((scm_t_bits) ...) - is the definition of
> SCM_NEWSMOB correct in using (scm_t_bits) rather than SCM_UNPACK ?

The definition of SCM_NEWSMOB is correct; its prototype is

  SCM SCM_NEWSMOB (scm_t_bits tag, scm_t_bits data);

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)));

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

[Prev in Thread] Current Thread [Next in Thread]