1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix doc string of `dynamic-pointer'.

* libguile/dynl.c (scm_dynamic_pointer): Fix doc string.  Reformat body.
This commit is contained in:
Ludovic Courtès 2010-03-17 00:06:13 +01:00
parent 087aa6aa31
commit 3023e7b0c9

View file

@ -220,8 +220,8 @@ SCM_DEFINE (scm_dynamic_pointer, "dynamic-pointer", 3, 1, 0,
"shared object referred to by @var{dobj}. The handle\n" "shared object referred to by @var{dobj}. The handle\n"
"aliases a C value, and is declared to be of type\n" "aliases a C value, and is declared to be of type\n"
"@var{type}. Valid types are defined in the\n" "@var{type}. Valid types are defined in the\n"
"@code{(system vm ffi)} module.\n\n" "@code{(system foreign)} module.\n\n"
"This facility works by asking the operating system for\n" "This facility works by asking the dynamic linker for\n"
"the address of a symbol, then assuming that it aliases a\n" "the address of a symbol, then assuming that it aliases a\n"
"value of a given type. Obviously, the user must be very\n" "value of a given type. Obviously, the user must be very\n"
"careful to ensure that the value actually is of the\n" "careful to ensure that the value actually is of the\n"
@ -237,11 +237,12 @@ SCM_DEFINE (scm_dynamic_pointer, "dynamic-pointer", 3, 1, 0,
SCM_VALIDATE_STRING (1, name); SCM_VALIDATE_STRING (1, name);
t = scm_to_unsigned_integer (type, 0, SCM_FOREIGN_TYPE_LAST); t = scm_to_unsigned_integer (type, 0, SCM_FOREIGN_TYPE_LAST);
/*fixme* GC-problem */
SCM_VALIDATE_SMOB (SCM_ARG3, dobj, dynamic_obj); SCM_VALIDATE_SMOB (SCM_ARG3, dobj, dynamic_obj);
if (DYNL_HANDLE (dobj) == NULL) {
if (DYNL_HANDLE (dobj) == NULL)
SCM_MISC_ERROR ("Already unlinked: ~S", dobj); SCM_MISC_ERROR ("Already unlinked: ~S", dobj);
} else { else
{
char *chars; char *chars;
scm_dynwind_begin (0); scm_dynwind_begin (0);
@ -249,6 +250,7 @@ SCM_DEFINE (scm_dynamic_pointer, "dynamic-pointer", 3, 1, 0,
scm_dynwind_free (chars); scm_dynwind_free (chars);
val = sysdep_dynl_value (chars, DYNL_HANDLE (dobj), FUNC_NAME); val = sysdep_dynl_value (chars, DYNL_HANDLE (dobj), FUNC_NAME);
scm_dynwind_end (); scm_dynwind_end ();
return scm_take_foreign_pointer (t, val, return scm_take_foreign_pointer (t, val,
SCM_UNBNDP (len) ? 0 : scm_to_size_t (len), SCM_UNBNDP (len) ? 0 : scm_to_size_t (len),
NULL); NULL);