mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
include dlerror if we can't find sexp_init_library
This commit is contained in:
parent
917387616e
commit
17b7ee3f98
1 changed files with 3 additions and 1 deletions
4
eval.c
4
eval.c
|
@ -1357,8 +1357,10 @@ static sexp sexp_load_dl (sexp ctx, sexp file, sexp env) {
|
||||||
}
|
}
|
||||||
init = dlsym(handle, "sexp_init_library");
|
init = dlsym(handle, "sexp_init_library");
|
||||||
if (! init) {
|
if (! init) {
|
||||||
|
res = sexp_c_string(ctx, dlerror(), -1);
|
||||||
|
res = sexp_list2(ctx, file, res);
|
||||||
dlclose(handle);
|
dlclose(handle);
|
||||||
return sexp_compile_error(ctx, "dynamic library has no sexp_init_library", file);
|
return sexp_compile_error(ctx, "dynamic library has no sexp_init_library", res);
|
||||||
}
|
}
|
||||||
sexp_gc_preserve2(ctx, res, old_dl);
|
sexp_gc_preserve2(ctx, res, old_dl);
|
||||||
old_dl = sexp_context_dl(ctx);
|
old_dl = sexp_context_dl(ctx);
|
||||||
|
|
Loading…
Add table
Reference in a new issue