PerlIO_read() can return negative.
[p5sagit/p5-mst-13.2.git] / ext / DynaLoader / dl_dyld.xs
index 752ac36..2ac2baa 100644 (file)
@@ -54,7 +54,7 @@ static char *dlerror()
     return dl_last_error;
 }
 
-int dlclose(handle) /* stub only */
+static int dlclose(handle) /* stub only */
 void *handle;
 {
     return 0;
@@ -116,12 +116,13 @@ static char *dlopen(char *path, int mode /* mode is ignored */)
        // NSLinkModule will cause the run to abort on any link error's
        // not very friendly but the error recovery functionality is limited.
        handle = NSLinkModule(ofile, path, TRUE);
+       NSDestroyObjectFileImage(ofile);
     }
 
     return handle;
 }
 
-void *
+static void *
 dlsym(handle, symbol)
 void *handle;
 char *symbol;