1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 18:20:22 +02:00

more ffi docs

* libguile/foreign.c (scm_make_foreign_function): Doc a little.
* doc/ref/api-foreign.texi (Foreign Function Interface): Document some
  more.
This commit is contained in:
Andy Wingo 2010-04-06 00:45:35 +02:00
parent dcc69bab8c
commit 71725997c7
2 changed files with 253 additions and 54 deletions

View file

@ -634,7 +634,13 @@ fill_ffi_type (SCM type, ffi_type *ftype, ffi_type ***type_ptrs,
SCM_DEFINE (scm_make_foreign_function, "make-foreign-function", 3, 0, 0,
(SCM return_type, SCM func_ptr, SCM arg_types),
"foo")
"Make a foreign function.\n\n"
"Given the foreign void pointer @var{func_ptr}, its argument and\n"
"return types @var{arg_types} and @var{return_type}, return a\n"
"procedure that will pass arguments to the foreign function\n"
"and return appropriate values.\n\n"
"@var{arg_types} should be a list of foreign types.\n"
"@code{return_type} should be a foreign type.")
#define FUNC_NAME s_scm_make_foreign_function
{
SCM walk, scm_cif;