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

Rename make-foreign-function' to pointer->procedure'.

* libguile/foreign.c (scm_make_foreign_function): Rename to...
  (scm_pointer_to_procedure): ... this.
* libguile/foreign.h: Adjust accordingly.
* module/system/foreign.scm: Likewise.
* test-suite/standalone/test-ffi: Likewise.
* test-suite/tests/foreign.test: Likewise.
* doc/ref/api-foreign.texi: Likewise.
This commit is contained in:
Ludovic Courtès 2010-09-06 22:24:44 +02:00
parent 7884975a89
commit 2ee073587a
6 changed files with 67 additions and 68 deletions

View file

@ -530,7 +530,7 @@ fill_ffi_type (SCM type, ffi_type *ftype, ffi_type ***type_ptrs,
*ftype = ffi_type_void;
return;
default:
scm_wrong_type_arg_msg ("make-foreign-function", 0, type,
scm_wrong_type_arg_msg ("pointer->procedure", 0, type,
"foreign type");
}
}
@ -641,7 +641,7 @@ make_cif (SCM return_type, SCM arg_types, const char *caller)
}
#undef FUNC_NAME
SCM_DEFINE (scm_make_foreign_function, "make-foreign-function", 3, 0, 0,
SCM_DEFINE (scm_pointer_to_procedure, "pointer->procedure", 3, 0, 0,
(SCM return_type, SCM func_ptr, SCM arg_types),
"Make a foreign function.\n\n"
"Given the foreign void pointer @var{func_ptr}, its argument and\n"
@ -650,7 +650,7 @@ SCM_DEFINE (scm_make_foreign_function, "make-foreign-function", 3, 0, 0,
"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
#define FUNC_NAME s_scm_pointer_to_procedure
{
ffi_cif *cif;

View file

@ -93,8 +93,8 @@ SCM_INTERNAL SCM scm_pointer_to_string (SCM pointer);
arguments.
*/
SCM_API SCM scm_make_foreign_function (SCM return_type, SCM func_ptr,
SCM arg_types);
SCM_API SCM scm_pointer_to_procedure (SCM return_type, SCM func_ptr,
SCM arg_types);
SCM_API SCM scm_procedure_to_pointer (SCM return_type, SCM func_ptr,
SCM arg_types);
SCM_INTERNAL SCM scm_i_foreign_call (SCM foreign, const SCM *argv);