From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: Critical section review Date: Thu, 24 Mar 2005 07:30:29 +0000 Message-ID: <42426C95.3060006@ossau.uklinux.net> References: <424125C0.7000407@ossau.uklinux.net> <66e540fe050323010240b4da11@mail.gmail.com> <4241CF4A.8070906@ossau.uklinux.net> <87acou11xb.fsf@zagadka.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111649630 17538 80.91.229.2 (24 Mar 2005 07:33:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2005 07:33:50 +0000 (UTC) Cc: djurfeldt@nada.kth.se, guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 24 08:33:49 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DEMpV-0000aH-5n for guile-devel@m.gmane.org; Thu, 24 Mar 2005 08:32:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEN4e-0003J8-Pu for guile-devel@m.gmane.org; Thu, 24 Mar 2005 02:48:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DEN4O-0003Fa-0S for guile-devel@gnu.org; Thu, 24 Mar 2005 02:47:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DEN4L-0003EI-Kp for guile-devel@gnu.org; Thu, 24 Mar 2005 02:47:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEN4L-0003EA-Dh for guile-devel@gnu.org; Thu, 24 Mar 2005 02:47:53 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DEMnd-0000oY-49 for guile-devel@gnu.org; Thu, 24 Mar 2005 02:30:37 -0500 Original-Received: from laruns (host81-130-189-32.in-addr.btopenworld.com [81.130.189.32]) by mail3.uklinux.net (Postfix) with ESMTP id 3D47E409FC7; Thu, 24 Mar 2005 07:30:35 +0000 (UTC) Original-Received: from [127.0.0.1] (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id 4F9476F6EA; Thu, 24 Mar 2005 07:30:30 +0000 (GMT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: en Original-To: Marius Vollmer In-Reply-To: <87acou11xb.fsf@zagadka.de> X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org X-MailScanner-To: guile-devel@m.gmane.org Xref: news.gmane.org gmane.lisp.guile.devel:4869 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4869 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 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel