This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
As 2/3rds (or 3/4s) of the SV head structure is rewritten, it doesn't
[perl5.git] / ext / DynaLoader / dl_mac.xs
index 3742287..6c624e7 100644 (file)
@@ -34,7 +34,7 @@ typedef struct {
 
 #define dl_connections (dl_cxtx.x_connections)
 
-static void terminate(void)
+static void terminate(pTHX_ void *ptr)
 {
     dMY_CXT;
     int size = GetHandleSize((Handle) dl_connections) / sizeof(ConnectionID);
@@ -78,7 +78,7 @@ dl_load_file(filename, flags=0)
        dMY_CXT;
        if (!dl_connections) {
            dl_connections = (ConnectionID **)NewHandle(0);
-           atexit(terminate);
+           call_atexit(terminate, (void*)0);
        }
         PtrAndHand((Ptr) &connID, (Handle) dl_connections, sizeof(ConnectionID));
        RETVAL = connID;