From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Evans Newsgroups: gmane.lisp.guile.devel Subject: Is struct.h:SCM_STRUCT_* "exported"? Date: Fri, 2 May 2014 11:33:13 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1399055607 24547 80.91.229.3 (2 May 2014 18:33:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 May 2014 18:33:27 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri May 02 20:33:20 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WgIGu-0002AS-Bb for guile-devel@m.gmane.org; Fri, 02 May 2014 20:33:20 +0200 Original-Received: from localhost ([::1]:45815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIGt-0002Yc-Tl for guile-devel@m.gmane.org; Fri, 02 May 2014 14:33:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIGp-0002YX-F2 for guile-devel@gnu.org; Fri, 02 May 2014 14:33:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgIGo-0000xa-QZ for guile-devel@gnu.org; Fri, 02 May 2014 14:33:15 -0400 Original-Received: from mail-yk0-x22b.google.com ([2607:f8b0:4002:c07::22b]:61710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIGo-0000xS-LK for guile-devel@gnu.org; Fri, 02 May 2014 14:33:14 -0400 Original-Received: by mail-yk0-f171.google.com with SMTP id 10so4120702ykt.16 for ; Fri, 02 May 2014 11:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=eQfwm2Q22k2d9Rs71+LnYTSNDeTZPR9CmxsjNGrhuxM=; b=VhhEJKSH+tCjV1/LEhe5DAJxw34cjhSWNyeclOzfY664mijIh7Ru28Q6HlfVtnZvh4 BwOSMFlTiGa9MQ1aeV2QPlTyt+WXSnxMgFAz/bfy5XOx7cZx+FxS+A+PT1SAnHPT5w4p Uk0NN3tRc2zTNt2JOXC1+2bElD7aWiQgBTvSd2AzfXUgF/pmKYZXpcoJW5VEk02an5SU IIaI7dUSuApCu93lbGRP46BsXm4damd1rme/fTTAXhfhjf4LdwR/kMk4UasWEy+Uydkp MiyNP04jXJgFZtzDxABq9ACjszCcymWjC/OgCWgcM1L6WlhoZnOqOs6ie7l+hjXCb3nx zFhg== X-Received: by 10.236.26.193 with SMTP id c41mr25514853yha.151.1399055593732; Fri, 02 May 2014 11:33:13 -0700 (PDT) Original-Received: by 10.170.214.130 with HTTP; Fri, 2 May 2014 11:33:13 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22b X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17126 Archived-At: Hi. Is any of the following exported? [or are they internal implementation details?] I can certainly imagine it's the latter, but the DATA versions do solve the problem (*1) of accessing struct fields as raw values. #define SCM_STRUCT_DATA(X) ((scm_t_bits*)SCM_CELL_WORD_1 (X)) #define SCM_STRUCT_DATA_REF(X,I) (SCM_STRUCT_DATA (X)[(I)]) #define SCM_STRUCT_DATA_SET(X,I,V) SCM_STRUCT_DATA (X)[(I)]=(V) [others too, just keeping this email brief] --- (*1): There's still type concerns like void * vs uintptr vs int vs char, etc. But for a lot of purposes (or at least mine :-)) they'll do.