guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is struct.h:SCM_STRUCT_* "exported"?


From: Doug Evans
Subject: Is struct.h:SCM_STRUCT_* "exported"?
Date: Fri, 2 May 2014 11:33:13 -0700

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 via email to

[Prev in Thread] Current Thread [Next in Thread]