From: Dmitry Bogatov <[email protected]>
---
doc/ref/api-foreign.texi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/doc/ref/api-foreign.texi b/doc/ref/api-foreign.texi
index 605dbed..6b0e34c 100644
--- a/doc/ref/api-foreign.texi
+++ b/doc/ref/api-foreign.texi
@@ -1124,6 +1124,22 @@ Here are some examples of @code{define-foreign-function}
usage:
@end example
@end deffn
+@deffn {Scheme Macro} define-foreign-bitmask name ((symbol value) ...)
+
+Define @code{name} to foreign-type record, that converts back and forth
+between C integer value and Scheme list of symbols. For example,
+@example
+(define-foreign-bitmask both: ((this #b01) (that #b10) (both #b11)))
+;; 0 = #b00 <-> '()
+;; 1 = #b01 <-> '(this)
+;; 2 = #b10 <-> '(that)
+;; 3 = #b11 <-> '(this that both)
+@end example
+
+As demonstrated by example, values can be arbitrary, but in most common
+each value have only one bit set.
+@end deffn
+
@c Local Variables:
@c TeX-master: "guile.texi"
@c End:
--
I may be not subscribed. Please, keep me in carbon copy.