manuel-serrano / bigloo

a practical Scheme compiler
http://www-sop.inria.fr/indes/fp/Bigloo
Other
135 stars 19 forks source link

handle the lib parameter of dynamic-load-sym the same as in dynamic-load #68

Closed donaldsonjw closed 2 years ago

donaldsonjw commented 2 years ago

dynamic-load derives the final library name used for loading by calling find-file/path. The resulting name is used to record that the library is loaded. dynamic-load-sym previously omitted this call to find-file/path resulting in the function failing unless the the absolute path to the library was used (i.e., lib = (find-file/path lib dynamic-load-path)). With this change, the following will succeed, assuming mylibrary.so is found in the dynamic-load-path, where it failed in the past.

(dynamic-load "mylibrary.so" #f 'mymodule) (define res (dynamic-load-symbol "mylibrary.so" "myprocedure" "mymodule"))