summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-26 07:22:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-26 07:22:06 -0700
commit92c0048854d91da1a1e5e49634b98a36a479f3b2 (patch)
treecedc4002d26feffb0b598121c452e40099ba5973 /txr.1
parent1402a54bd0596d4530e4c8aba1cf890553e905ec (diff)
downloadtxr-92c0048854d91da1a1e5e49634b98a36a479f3b2.tar.gz
txr-92c0048854d91da1a1e5e49634b98a36a479f3b2.tar.bz2
txr-92c0048854d91da1a1e5e49634b98a36a479f3b2.zip
ffi: new macro, deffi-sym.
* lisplib.c (ffi_set_entries): Add deffi-sym to autload list. * share/txr/stdlib/ffi.tl (deffi-sym): New macro. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.142
1 files changed, 42 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 27b1bad9..42c6bb0f 100644
--- a/txr.1
+++ b/txr.1
@@ -56438,6 +56438,48 @@ form need not be surrounded by a call to the
macro.
.RE
+.coNP Macro @ deffi-sym
+.synb
+.mets (deffi-sym < name < var-expr <> [ type-sym ])
+.syne
+.desc
+The
+.code deffi-sym
+macro defines a global lexical variable called
+.code name
+whose value is a
+.code cptr
+object that refers to a symbol in a foreign library.
+
+The
+.meta name
+argument gives the name for the variable to be defined.
+This definition takes place place as if by the
+.code defparml
+macro.
+
+The
+.meta var-expr
+is syntax which specifies the foreign pointer, using exactly the same
+conventions as described for the
+.code deffi-var
+macro, allowing for a short-hand notation if this form is
+enclosed in a
+.code with-dyn-lib
+macro invocation.
+
+The optional
+.meta type-sym
+argument must be a symbol. If it is absent, it defaults to nil.
+This argument specifies the type label for the
+.code cptr
+object which holds the pointer to the foreign symbol.
+
+The result value of
+.meta deffi-sym
+is the symbol
+.metn name .
+
.coNP Macro @ typedef
.synb
.mets (typedef < name << type-syntax )