[ID 20011201.170] Time::HiRes in devel-perl causes segfaults for xs users
Marc Lehmann [Sun, 2 Dec 2001 02:44:53 +0000 (03:44 +0100)]
Message-Id: <E16ALgb-0006Yw-00.pgcc-forever-2001-12-02-02-44-53@fuji.laendle>

p4raw-id: //depot/perl@13422

ext/Time/HiRes/HiRes.xs

index e1e13e1..781444a 100644 (file)
@@ -560,7 +560,7 @@ BOOT:
 #ifdef HAS_GETTIMEOFDAY
 {
   UV auv[2];
-  hv_store(PL_modglobal, "Time::NVtime", 12, newSViv((IV) myNVtime()), 0);
+  hv_store(PL_modglobal, "Time::NVtime", 12, newSViv(PTR2INT(myNVtime)), 0);
   if (myU2time(auv) == 0)
     hv_store(PL_modglobal, "Time::U2time", 12, newSViv((IV) auv[0]), 0);
 }