mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 23:37:38 +02:00
WIP
This commit is contained in:
parent
a93c1e8cde
commit
a63fb1b1c7
2 changed files with 11 additions and 2 deletions
11
runtime.c
11
runtime.c
|
@ -5603,9 +5603,18 @@ void Cyc_import_shared_object(void *data, object cont, object filename, object e
|
|||
Cyc_check_str(data, entry_pt_fnc);
|
||||
handle = dlopen(string_str(filename), RTLD_LAZY);
|
||||
if (handle == NULL) {
|
||||
Cyc_rt_raise2(data, "Unable to import library from", filename);
|
||||
//make_string(s, dlerror());
|
||||
fprintf(stderr, "%s\n", dlerror());
|
||||
Cyc_rt_raise2(data, "Unable to import library", filename);
|
||||
}
|
||||
dlerror(); /* Clear any existing error */
|
||||
|
||||
entry_pt = (function_type) dlsym(handle, string_str(entry_pt_fnc));
|
||||
if (entry_pt == NULL) {
|
||||
//make_string(s, dlerror());
|
||||
fprintf(stderr, "%s\n", dlerror());
|
||||
Cyc_rt_raise2(data, "Unable to load symbol", entry_pt_fnc);
|
||||
}
|
||||
mclosure1(clo, entry_pt, cont);
|
||||
entry_pt(data, 0, &clo, &clo);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue