X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-grovel%2Fsb-grovel.texinfo;h=8c7b0aa9211bfe5ffa9997180f5721338434e2ae;hb=9303b3dc86bdfe5193b403de7419dc5bc8cc79e4;hp=5e5f043e6f495b9d9fa2f84274470df6156d8718;hpb=d4c7ab04ed10729a2cfa3321f4382d8a218ad958;p=sbcl.git diff --git a/contrib/sb-grovel/sb-grovel.texinfo b/contrib/sb-grovel/sb-grovel.texinfo index 5e5f043..8c7b0aa 100644 --- a/contrib/sb-grovel/sb-grovel.texinfo +++ b/contrib/sb-grovel/sb-grovel.texinfo @@ -41,7 +41,7 @@ Add it as a component in your system. e.g. (require :sb-grovel)) (defpackage :example-package.system - (:use :cl :asdf :sb-grovel)) + (:use :cl :asdf :sb-grovel :sb-alien)) (in-package :example-package.system) @@ -105,13 +105,23 @@ Here's how to use the grovel clauses: @item @code{:integer} - constant expressions in C. Used in this form: @lisp - (:integer lisp-variable-name "C expression") + (:integer lisp-variable-name "C expression" &optional doc export) @end lisp @code{"C expression"} will be typically be the name of a constant. But other forms are possible. @item +@code{:enum} +@lisp + (:enum lisp-type-name ((lisp-enumerated-name c-enumerated-name) ...))) +@end lisp + +An @code{sb-alien:enum} type with name @code{lisp-type-name} will be defined. +The symbols are the @code{lisp-enumerated-name}s, and the values +are grovelled from the @code{c-enumerated-name}s. + +@item @code{:structure} - alien structure definitions look like this: @lisp (:structure lisp-struct-name ("struct c_structure" @@ -171,7 +181,7 @@ structure member. @item @code{:function} - alien function definitions are similar to @code{define-alien-routine} definitions, because they expand to such -forms when the lisp program is loaded. @xref{Foreign Function Calls} +forms when the lisp program is loaded. @xref{Foreign Function Calls}. @lisp (:function lisp-function-name ("alien_function_name" alien-return-type