src/Pure/General/sha1.ML
changeset 72661 fca4d6abebda
parent 72554 81518b38b316
equal deleted inserted replaced
72660:7d4e9f7742c6 72661:fca4d6abebda
   148 val library_path =
   148 val library_path =
   149   Path.explode ("$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so"));
   149   Path.explode ("$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so"));
   150 
   150 
   151 val library_call =
   151 val library_call =
   152   Foreign.buildCall3
   152   Foreign.buildCall3
   153     (Foreign.getSymbol (Foreign.loadLibrary (File.platform_path library_path)) "sha1_buffer",
   153     (Foreign.getSymbol
       
   154       (Foreign.loadLibraryIndirect (fn () => File.platform_path library_path)) "sha1_buffer",
   154       (Foreign.cByteArray, Foreign.cUlong, Foreign.cPointer), Foreign.cPointer);
   155       (Foreign.cByteArray, Foreign.cUlong, Foreign.cPointer), Foreign.cPointer);
   155 
   156 
   156 fun with_memory n =
   157 fun with_memory n =
   157   Thread_Attributes.uninterruptible (fn restore_attributes => fn f =>
   158   Thread_Attributes.uninterruptible (fn restore_attributes => fn f =>
   158     let
   159     let