utf16_to_utf8() should croak on encountering a bare low surrogate.
[p5sagit/p5-mst-13.2.git] / ext / DynaLoader / dl_dlopen.xs
index 5978bfd..dfa9d06 100644 (file)
@@ -246,13 +246,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=%"UVxf")\n",
                perl_name, PTR2UV(symref)));
-    ST(0) = sv_2mortal(newRV((SV*)newXS(perl_name,
-                                       DPTR2FPTR(XSUBADDR_t, symref),
-                                       filename)));
+    ST(0) = sv_2mortal(newRV((SV*)newXS_flags(perl_name,
+                                             DPTR2FPTR(XSUBADDR_t, symref),
+                                             filename, NULL,
+                                             XS_DYNAMIC_FILENAME)));
 
 
 char *
@@ -263,4 +264,19 @@ 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);
+
+#endif
+
 # end.