summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.130
1 files changed, 30 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 9cb01efb..d6a016ca 100644
--- a/txr.1
+++ b/txr.1
@@ -76030,6 +76030,36 @@ macro yields the compiled version of
.meta type-syntax
as its value.
+.coNP Macros @ deffi-struct and @ deffi-union
+.synb
+.mets (deffi-struct < name >> {( slot < type <> [ init-form ])}*)
+.mets (deffi-union < name >> {( slot < type <> [ init-form ])}*)
+.syne
+.desc
+The
+.code deffi-struct
+and
+.code deffi-union
+macros provide a more compact notation for defining FFI structure and union
+types together with matching
+.code typedef
+names.
+
+The semantics follows from these equivalences:
+
+.verb
+ (deffi-struct S ...) <--> (typedef S (struct S ...))
+ (deffi-union U ...) <--> (typedef U (union U ...))
+.brev
+
+.TP* Example:
+
+.verb
+ (deffi-struct point
+ (x double)
+ (y double))
+.brev
+
.coNP Macro @ sizeof
.synb
.mets (sizeof < type-syntax <> [ object-expr ])