From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: The relationship between SCM and scm_t_bits. Date: Mon, 10 May 2004 15:42:40 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084199514 11175 80.91.224.253 (10 May 2004 14:31:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 14:31:54 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 10 16:31:27 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNBoU-0005OT-00 for ; Mon, 10 May 2004 16:31:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BNB5p-0002dy-1Y for guile-devel@m.gmane.org; Mon, 10 May 2004 09:45:17 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BNB3w-0002Rd-L8 for guile-devel@gnu.org; Mon, 10 May 2004 09:43:20 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BNB3N-0002Fk-TY for guile-devel@gnu.org; Mon, 10 May 2004 09:43:17 -0400 Original-Received: from [129.217.163.1] (helo=mail.dt.e-technik.uni-dortmund.de) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BNB3M-0002EQ-Km for guile-devel@gnu.org; Mon, 10 May 2004 09:42:45 -0400 Original-Received: from troy.dt.e-technik.uni-dortmund.de (troy.dt.e-technik.uni-dortmund.de [129.217.163.17]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id D3A7A19E7F for ; Mon, 10 May 2004 15:42:40 +0200 (CEST) Original-Received: by troy.dt.e-technik.uni-dortmund.de (Postfix, from userid 520) id 8279BB99D; Mon, 10 May 2004 15:42:40 +0200 (CEST) Original-To: guile-devel@gnu.org In-Reply-To: (Marius Vollmer's message of "Mon, 03 May 2004 17:06:20 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3694 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3694 Marius Vollmer writes: > Hi, > > I just got confused about our two 'fundamental' types, SCM and > scm_t_bits. Ok, so this is what I have done now: * Changes to the C interface ** SCM_CELL_WORD_LOC has been deprecated. Use the new macro SCM_CELL_OBJECT_LOC instead, which return a pointer to a SCM, as opposed to a pointer to a scm_t_bits. This was done to allow the correct use of pointers into the Scheme heap. Previously, the heap words were of type scm_t_bits and local variables and function arguments were of type SCM, making it non-standards-conformant to have a pointer that can point to both. ** New macros SCM_SMOB_DATA_2, SM_SMOB_DATA_3, etc. These macros should be used instead of SCM_CELL_WORD_2/3 to access the second and third words of double smobs. Likewise for SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be used to get and set the 16 exra bits in the zeroth word of a smob. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for accesing the first immediate word of a smob as a SCM value, and there is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate smob words. Like wise for SCM_SMOB_OBJECT_2, etc. I've also updated the smob documentation in the manual. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel