* Is struct.h:SCM_STRUCT_* "exported"?
@ 2014-05-02 18:33 Doug Evans
0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2014-05-02 18:33 UTC (permalink / raw)
To: guile-devel
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-02 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-02 18:33 Is struct.h:SCM_STRUCT_* "exported"? Doug Evans
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).