diff options
author | Tom Tromey <tom@tromey.com> | 2015-12-17 16:51:32 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2015-12-17 16:58:23 -0700 |
commit | 8a7cdeb0412f9ef8bbe0a7833d662dbec40b472f (patch) | |
tree | 758b52b7c879f7c74dcfc544812a44a39e12e168 /doc | |
parent | 88deacdd4220b66805b6ad10abd61fa3640afb67 (diff) | |
download | libffi-8a7cdeb0412f9ef8bbe0a7833d662dbec40b472f.tar.gz |
fix formatting of ffi_prep_closure_loc arguments
Diffstat (limited to 'doc')
-rw-r--r-- | doc/libffi.texi | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/doc/libffi.texi b/doc/libffi.texi index 0459899..4f6512f 100644 --- a/doc/libffi.texi +++ b/doc/libffi.texi @@ -776,23 +776,30 @@ the closure function: @findex ffi_prep_closure_loc @defun ffi_status ffi_prep_closure_loc (ffi_closure *@var{closure}, ffi_cif *@var{cif}, void (*@var{fun}) (ffi_cif *@var{cif}, void *@var{ret}, void **@var{args}, void *@var{user_data}), void *@var{user_data}, void *@var{codeloc}) -Prepare a closure function. +Prepare a closure function. The arguments to +@code{ffi_prep_closure_loc} are: -@var{closure} is the address of a @code{ffi_closure} object; this is -the writable address returned by @code{ffi_closure_alloc}. +@table @var +@item closure +The address of a @code{ffi_closure} object; this is the writable +address returned by @code{ffi_closure_alloc}. -@var{cif} is the @code{ffi_cif} describing the function parameters. -Note that this object, and the types to which it refers, must be kept -alive until the closure itself is freed. +@item cif +The @code{ffi_cif} describing the function parameters. Note that this +object, and the types to which it refers, must be kept alive until the +closure itself is freed. -@var{user_data} is an arbitrary datum that is passed, uninterpreted, -to your closure function. +@item user_data +An arbitrary datum that is passed, uninterpreted, to your closure +function. -@var{codeloc} is the executable address returned by -@code{ffi_closure_alloc}. +@item codeloc +The executable address returned by @code{ffi_closure_alloc}. + +@item fun +The function which will be called when the closure is invoked. It is +called with the arguments: -@var{fun} is the function which will be called when the closure is -invoked. It is called with the arguments: @table @var @item cif The @code{ffi_cif} passed to @code{ffi_prep_closure_loc}. @@ -814,6 +821,7 @@ A vector of pointers to memory holding the arguments to the function. The same @var{user_data} that was passed to @code{ffi_prep_closure_loc}. @end table +@end table @code{ffi_prep_closure_loc} will return @code{FFI_OK} if everything went ok, and one of the other @code{ffi_status} values on error. |