This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for a951350815 (PerlIO-scalar)
[perl5.git] / ext / DynaLoader / dl_hpux.xs
index 5e7c744..2cd6790 100644 (file)
@@ -51,7 +51,7 @@ BOOT:
     (void)dl_private_init(aTHX);
 
 
-void *
+void
 dl_load_file(filename, flags=0)
     char *     filename
     int                flags
@@ -115,7 +115,7 @@ dl_unload_file(libref)
     RETVAL
 
 
-void *
+void
 dl_find_symbol(libhandle, symbolname)
     void *     libhandle
     char *     symbolname
@@ -150,7 +150,7 @@ dl_find_symbol(libhandle, symbolname)
 
 void
 dl_undef_symbols()
-    PPCODE:
+    CODE:
 
 
 
@@ -160,14 +160,14 @@ void
 dl_install_xsub(perl_name, symref, filename="$Package")
     char *     perl_name
     void *     symref 
-    char *     filename
+    const char *       filename
     CODE:
     DLDEBUG(2,PerlIO_printf(Perl_debug_log, "dl_install_xsub(name=%s, symref=%x)\n",
            perl_name, symref));
-    ST(0) = sv_2mortal(newRV((SV*)newXS(perl_name,
-                                       (void(*)(pTHX_ CV *))symref,
-                                       filename)));
-
+    ST(0) = sv_2mortal(newRV((SV*)newXS_flags(perl_name,
+                                             (void(*)(pTHX_ CV *))symref,
+                                             filename, NULL,
+                                             XS_DYNAMIC_FILENAME)));
 
 char *
 dl_error()
@@ -177,4 +177,20 @@ dl_error()
     OUTPUT:
     RETVAL
 
+#if defined(USE_ITHREADS)
+
+void
+CLONE(...)
+    CODE:
+    MY_CXT_CLONE;
+
+    /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid
+     * using Perl variables that belong to another thread, we create our 
+     * own for this thread.
+     */
+    MY_CXT.x_dl_last_error = newSVpvn("", 0);
+    dl_resolve_using = get_av("DynaLoader::dl_resolve_using", GV_ADDMULTI);
+
+#endif
+
 # end.