unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: guile-devel <guile-devel@gnu.org>
Subject: Is struct.h:SCM_STRUCT_* "exported"?
Date: Fri, 2 May 2014 11:33:13 -0700	[thread overview]
Message-ID: <CAP9bCMTbUgG6tuMgu7bH-RdDO_dB+oOOB_HqE41ogEdB=21qrw@mail.gmail.com> (raw)

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.



                 reply	other threads:[~2014-05-02 18:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP9bCMTbUgG6tuMgu7bH-RdDO_dB+oOOB_HqE41ogEdB=21qrw@mail.gmail.com' \
    --to=xdje42@gmail.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).