diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-20 14:48:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-20 14:48:28 -0700 |
commit | 66479625440d34dbb43b8e8a5f645dca95f9cc97 (patch) | |
tree | 7bc12b030275e4410711f4016184159d2c97f165 /share | |
parent | 914368cbdca3a26a0e790bf47acec4a393a481c4 (diff) | |
download | txr-66479625440d34dbb43b8e8a5f645dca95f9cc97.tar.gz txr-66479625440d34dbb43b8e8a5f645dca95f9cc97.tar.bz2 txr-66479625440d34dbb43b8e8a5f645dca95f9cc97.zip |
ffi: overhaul ffi-call API and document it.
* ffi.c (ffi_call_wrap): Take struct args * parameters
rather than a list. Check that number of arguments
matches required number from call desc. No need
to build argument array any more; we just refer to
the one in args. Also, the first two parameters
are reversed for consistency with other functions.
(ffi_init): Update registration of ffi-call to
reflect type change.
* ffi.h (ffi_call_wrap): Declaration updated.
* txr.1: Documented ffi-call.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/ffi.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/ffi.tl b/share/txr/stdlib/ffi.tl index 12f9dab6..99d76137 100644 --- a/share/txr/stdlib/ffi.tl +++ b/share/txr/stdlib/ffi.tl @@ -67,7 +67,7 @@ ,arg-types-sym)) (defvarl ,fun-sym ,fun-ref) (defun ,name ,args-sym - (ffi-call ,call-desc-sym ,fun-sym ,args-sym)))))) + (ffi-call ,fun-sym ,call-desc-sym . ,args-sym)))))) (defmacro deffi-type (name type-expr) ^(ffi-typedef ',name (ffi-type-compile ',type-expr))) |