commit 9ad0b401960c9b28fe9b1d348e8085312f10aa77
parent 7b792341cd588db9f4227749ebcde177212f1c58
Author: Alexander Burger <abu@software-lab.de>
Date: Mon, 20 Jun 2011 16:43:37 +0200
Extended docs for 'native' arguments
Diffstat:
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/doc/refL.html b/doc/refL.html
@@ -295,8 +295,9 @@ function <code>fun</code>, and returns a pointer <code>num</code> suitable to be
passed to a C function via 'native'. If <code>fun</code> is <code>NIL</code>,
the corresponding entry is freed. Maximally 24 callback functions can be
installed that way. 'fun' should be a function of maximally five numbers, and
-should return a number. See also <code><a
-href="refN.html#native">native</a></code>.
+should return a number. "Numbers" in this context are 64-bit scalars, and may
+not only represent integers, but also pointers or other encoded data. See also
+<code><a href="refN.html#native">native</a></code>.
<pre><code>
(load "lib/native.l")
diff --git a/doc/refN.html b/doc/refN.html
@@ -167,7 +167,7 @@ structures, e.g.
scale. If the scale is positive, the number is passed as a
<code>double</code>, otherwise as a <code>float</code>.
<li>symbols (passed as strings), or
-<li>structures, as a list with
+<li>structures, as lists with
<ul>
<li>a variable in the CAR (to recieve the returned structure data, ignored
when the CAR is <code>NIL</code>)
@@ -189,6 +189,9 @@ structures, e.g.
</ul>
</ul>
+<p><code>native</code> takes care of allocating memory for strings, arrays or
+structures, and frees that memory when done.
+
<p>The number of fixpoint arguments is limited to six. For NaN or negative
infinity <code>NIL</code>, and for positive infinity <code>T</code> is returned.
@@ -218,8 +221,9 @@ This is 123.456
<p>which accepts a symbol name as the first argument, and up to 5 numbers.
<code>lisp()</code> calls that symbol with the five numbers, and expects a
-numeric return value. All numbers in this context should not be larger than 60
-bits (signed). See also <code><a href="refL.html#lisp">lisp</a></code>.
+numeric return value. "Numbers" in this context are 64-bit scalars, and may not
+only represent integers, but also pointers or other encoded data. See also
+<code><a href="refL.html#lisp">lisp</a></code>.
<dt><a name="need"><code>(need 'cnt ['lst ['any]]) -> lst</code></a>
<dt><code>(need 'cnt ['num|sym]) -> lst</code>