On 09/11/2020 17:01, David Matthews wrote:
What is needed is a hook so that when Foreign.library actually calls Foreign.System.loadLibrary it first calls your function to get the path.  It would do this once immediately before calling "sha1_buffer" for the first time during any run.


I've added Foreign.loadLibraryIndirect which takes a unit->string function to supply the path name. This function is called just before the library is actually loaded when the foreign function is first run and should do what you want. Give it a try and see how it is.

David
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to