From: Jarkko Hietaniemi Date: Fri, 2 Nov 2001 21:56:36 +0000 (+0000) Subject: Integrate change #12820 from macperl to maint and blead; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e45b21abb8d1285dcc9ad076dbef8725daa205dc;p=p5sagit%2Fp5-mst-13.2.git Integrate change #12820 from macperl to maint and blead; Fix up (dynaloading) to work properly with multiplicity p4raw-link: @12820 on //depot/maint-5.6/macperl: 1254e164e862d84b4c35d69c6880819df23c4acd p4raw-id: //depot/perl@12823 p4raw-integrated: from //depot/maint-5.6/macperl@12818 'merge in' ext/DynaLoader/dl_mac.xs (@12699..) --- diff --git a/ext/DynaLoader/dl_mac.xs b/ext/DynaLoader/dl_mac.xs index dd1ddfa..6c624e7 100644 --- a/ext/DynaLoader/dl_mac.xs +++ b/ext/DynaLoader/dl_mac.xs @@ -34,9 +34,8 @@ typedef struct { #define dl_connections (dl_cxtx.x_connections) -static void terminate(void) +static void terminate(pTHX_ void *ptr) { - dTHX; dMY_CXT; int size = GetHandleSize((Handle) dl_connections) / sizeof(ConnectionID); HLock((Handle) dl_connections); @@ -79,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;