File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,13 @@ open_library(const char *filename)
3939 return LoadLibrary (filename );
4040}
4141
42- void
42+ static char *
43+ get_library_error ()
44+ {
45+ return "Unable to load library" ;
46+ }
47+
48+ static void
4349close_library (library_t library )
4450{
4551 if (!FreeLibrary (library )) {
@@ -90,6 +96,12 @@ open_library(const char *filename)
9096 return dlopen (filename , RTLD_LAZY | RTLD_GLOBAL );
9197}
9298
99+ static char *
100+ get_library_error ()
101+ {
102+ return dlerror ();
103+ }
104+
93105void
94106close_library (library_t filename )
95107{
@@ -660,7 +672,7 @@ py_load_library(value filename_ocaml, value debug_build_ocaml)
660672 const char * filename = String_val (Field (filename_ocaml , 0 ));
661673 library = open_library (filename );
662674 if (!library ) {
663- failwith ("Library not found" );
675+ failwith (get_library_error () );
664676 }
665677 }
666678 else {
You can’t perform that action at this time.
0 commit comments