PerlIO_read() can return negative.
[p5sagit/p5-mst-13.2.git] / ext / DynaLoader / dl_dyld.xs
index 87642ee..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;
@@ -76,7 +76,7 @@ static void TranslateError
     {
        "%s(%d): Object Image Load Failure\n",
        "%s(%d): Object Image Load Success\n",
-       "%s(%d): Not an recognisable object file\n",
+       "%s(%d): Not a recognisable object file\n",
        "%s(%d): No valid architecture\n",
        "%s(%d): Object image has an invalid format\n",
        "%s(%d): Invalid access (permissions?)\n",
@@ -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;