* libguile/dynl.c (sysdep_dynl_value): Failure to find a symbol is not
an error, so raise our own, more appropriate error.
* test-suite/tests/foreign.test ("dynamic-pointer"): Add a test.
fptr = lt_dlsym ((lt_dlhandle) handle, symb);
if (!fptr)
- {
- scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);
- }
+ scm_misc_error (subr, "Symbol not found: ~a",
+ scm_list_1 (scm_from_locale_string (symb)));
return fptr;
}
#:use-module (test-suite lib))
\f
+(with-test-prefix "dynamic-pointer"
+
+ (pass-if-exception
+ "error message"
+ '(misc-error . "^Symbol not found")
+ (dynamic-func "does_not_exist___" (dynamic-link))))
+
+\f
(with-test-prefix "null pointer"
(pass-if "pointer?"