r20067 - in /branches/upstream/libevent-perl/current: Event.xs MANIFEST META.yml Makefile.PL c/ev.c c/group.c c/idle.c c/io.c c/queue.c c/timeable.c c/timer.c c/typemap.c c/unix.c demo/idle2.t lib/Event.pm lib/Event/EventAPI.h t/idle2.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat May 17 15:29:52 UTC 2008


Author: gregoa
Date: Sat May 17 15:29:52 2008
New Revision: 20067

URL: http://svn.debian.org/wsvn/?sc=1&rev=20067
Log:
[svn-upgrade] Integrating new upstream version, libevent-perl (1.11)

Added:
    branches/upstream/libevent-perl/current/demo/idle2.t
Removed:
    branches/upstream/libevent-perl/current/t/idle2.t
Modified:
    branches/upstream/libevent-perl/current/Event.xs
    branches/upstream/libevent-perl/current/MANIFEST
    branches/upstream/libevent-perl/current/META.yml
    branches/upstream/libevent-perl/current/Makefile.PL
    branches/upstream/libevent-perl/current/c/ev.c
    branches/upstream/libevent-perl/current/c/group.c
    branches/upstream/libevent-perl/current/c/idle.c
    branches/upstream/libevent-perl/current/c/io.c
    branches/upstream/libevent-perl/current/c/queue.c
    branches/upstream/libevent-perl/current/c/timeable.c
    branches/upstream/libevent-perl/current/c/timer.c
    branches/upstream/libevent-perl/current/c/typemap.c
    branches/upstream/libevent-perl/current/c/unix.c
    branches/upstream/libevent-perl/current/lib/Event.pm
    branches/upstream/libevent-perl/current/lib/Event/EventAPI.h

Modified: branches/upstream/libevent-perl/current/Event.xs
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/Event.xs?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/Event.xs (original)
+++ branches/upstream/libevent-perl/current/Event.xs Sat May 17 15:29:52 2008
@@ -118,7 +118,7 @@
 
 /* Is time() portable everywhere?  Hope so!  XXX */
 
-static double fallback_NVtime()
+static NV fallback_NVtime()
 { return time(0); }
 
 #include "Event.h"
@@ -150,7 +150,7 @@
 /* IntervalEpsilon should be equal to the clock's sleep resolution
    (poll or select) times two.  It probably needs to be bigger if you turn
    on lots of debugging?  Can determine this dynamically? XXX */
-static double IntervalEpsilon = 0.0002;
+static NV IntervalEpsilon = 0.0002;
 static int TimeoutTooEarly=0;
 
 static struct EventAPI api;
@@ -210,14 +210,14 @@
 }
 
 #ifdef HAS_GETTIMEOFDAY
-double null_loops_per_second(int sec)
+NV null_loops_per_second(int sec)
 {
 	/*
 	  This should be more realistic.  It is used to normalize
 	  the benchmark against some theoretical perfect event loop.
 	*/
 	struct timeval start_tm, done_tm;
-	double elapse;
+	NV elapse;
 	unsigned count=0;
 	int fds[2];
 	if (pipe(fds) != 0) croak("pipe");
@@ -259,7 +259,7 @@
 return count/sec;
 }
 #else /* !HAS_GETTIMEOFDAY */
-double null_loops_per_second(int sec)
+NV null_loops_per_second(int sec)
 { croak("sorry, gettimeofday is not available"); }
 #endif
 
@@ -395,10 +395,10 @@
 	SV **svp = hv_fetch(PL_modglobal, "Time::NVtime", 12, 0);
 	if (!svp || !*svp || !SvIOK(*svp))
 	    XSRETURN_NO;
-	api.NVtime = INT2PTR(double(*)(), SvIV(*svp));
+	api.NVtime = INT2PTR(NV(*)(), SvIV(*svp));
 	XSRETURN_YES;
 
-double
+NV
 time()
 	PROTOTYPE:
 	CODE:
@@ -408,12 +408,12 @@
 
 void
 sleep(tm)
-	double tm;
+	NV tm;
 	PROTOTYPE: $
 	CODE:
 	pe_sys_sleep(tm);
 
-double
+NV
 null_loops_per_second(sec)
 	int sec
 
@@ -484,7 +484,7 @@
 one_event(...)
 	PROTOTYPE: ;$
 	CODE:
-	double maxtm = 60;
+	NV maxtm = 60;
 	if (items == 1) maxtm = SvNV(ST(0));
 	RETVAL = safe_one_event(maxtm);
 	OUTPUT:
@@ -524,7 +524,7 @@
 queue_time(prio)
 	int prio
 	PPCODE:
-	double max=0;
+	NV max=0;
 	int xx;
 	if (prio < 0 || prio >= PE_QUEUES)
 	  croak("queue_time(%d) out of domain [0..%d]",
@@ -559,7 +559,8 @@
 	if (WaDEBUGx(THIS) >= 3) {
 	    STRLEN n_a;
 	    warn("Event=0x%x '%s' DESTROY SV=0x%x",
-		 THIS, SvPV(THIS->up->desc, n_a), SvRV(THIS->mysv));
+		 THIS, SvPV(THIS->up->desc, n_a),
+		 THIS->mysv? SvRV(THIS->mysv) : 0);
 	}
 	(*THIS->vtbl->dtor)(THIS);
 }

Modified: branches/upstream/libevent-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/MANIFEST?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/MANIFEST (original)
+++ branches/upstream/libevent-perl/current/MANIFEST Sat May 17 15:29:52 2008
@@ -17,6 +17,7 @@
 ChangeLog
 demo/echo.t
 demo/group.t
+demo/idle2.t
 demo/msg.pm
 demo/perlqt.t
 demo/process.pm
@@ -60,7 +61,6 @@
 t/hook.t
 t/hup.t
 t/idle.t
-t/idle2.t
 t/io.t
 t/leak.t
 t/leak2.t

Modified: branches/upstream/libevent-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/META.yml?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/META.yml (original)
+++ branches/upstream/libevent-perl/current/META.yml Sat May 17 15:29:52 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Event
-version:      1.10
+version:      1.11
 version_from: ./lib/Event.pm
 installdirs:  site
 requires:

Modified: branches/upstream/libevent-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/Makefile.PL?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/Makefile.PL (original)
+++ branches/upstream/libevent-perl/current/Makefile.PL Sat May 17 15:29:52 2008
@@ -1,6 +1,6 @@
 # This -*- perl -*- script makes the Makefile
 
-require 5.006; # 5.005_005 fails
+require 5.006_003; # 5.006_002 fails
 
 use ExtUtils::MakeMaker;
 

Modified: branches/upstream/libevent-perl/current/c/ev.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/ev.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/ev.c (original)
+++ branches/upstream/libevent-perl/current/c/ev.c Sat May 17 15:29:52 2008
@@ -1,7 +1,7 @@
 /* 100 levels will trigger a manditory warning from perl */
 #define MAX_CB_NEST 95
 
-static double QueueTime[PE_QUEUES];
+static NV QueueTime[PE_QUEUES];
 
 static pe_cbframe CBFrame[MAX_CB_NEST];
 static int CurCBFrame = -1;

Modified: branches/upstream/libevent-perl/current/c/group.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/group.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/group.c (original)
+++ branches/upstream/libevent-perl/current/c/group.c Sat May 17 15:29:52 2008
@@ -31,7 +31,7 @@
 
 static char *pe_group_start(pe_watcher *ev, int repeat) {
     pe_group *gp = (pe_group*) ev;
-    double timeout;
+    NV timeout;
 
     if (!ev->callback)
 	return "without callback";
@@ -50,9 +50,9 @@
 static void pe_group_alarm(pe_watcher *wa, pe_timeable *tm) {
     STRLEN n_a;
     pe_group *gp = (pe_group*) wa;
-    double timeout;
-    double remaining;
-    double now = NVtime();
+    NV timeout;
+    NV remaining;
+    NV now = NVtime();
     int xx;
     for (xx=0; xx < gp->members; xx++) {
 	pe_watcher *mb = gp->member[xx];

Modified: branches/upstream/libevent-perl/current/c/idle.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/idle.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/idle.c (original)
+++ branches/upstream/libevent-perl/current/c/idle.c Sat May 17 15:29:52 2008
@@ -25,8 +25,8 @@
 }
 
 static char *pe_idle_start(pe_watcher *ev, int repeating) {
-    double now;
-    double min,max;
+    NV now;
+    NV min,max;
     pe_idle *ip = (pe_idle*) ev;
     if (!ev->callback)
 	return "without callback";
@@ -50,8 +50,8 @@
 }
 
 static void pe_idle_alarm(pe_watcher *wa, pe_timeable *_ignore) {
-    double now = NVtime();
-    double min,max,left;
+    NV now = NVtime();
+    NV min,max,left;
     pe_idle *ip = (pe_idle*) wa;
     pe_timeable_stop(&ip->tm);
     if (sv_2interval("min", ip->min_interval, &min)) {

Modified: branches/upstream/libevent-perl/current/c/io.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/io.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/io.c (original)
+++ branches/upstream/libevent-perl/current/c/io.c Sat May 17 15:29:52 2008
@@ -83,8 +83,8 @@
 
 static void pe_io_alarm(pe_watcher *_wa, pe_timeable *hit) {
     pe_io *wa = (pe_io*) _wa;
-    double now = NVtime();
-    double left = (_wa->cbtime + wa->timeout) - now;
+    NV now = NVtime();
+    NV left = (_wa->cbtime + wa->timeout) - now;
     if (left < IntervalEpsilon) {
 	pe_ioevent *ev;
 	if (WaREPEAT(wa)) {

Modified: branches/upstream/libevent-perl/current/c/queue.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/queue.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/queue.c (original)
+++ branches/upstream/libevent-perl/current/c/queue.c Sat May 17 15:29:52 2008
@@ -94,7 +94,7 @@
     return 0;
 }
 
-/*inline*/ static void pe_multiplex(double tm) {
+/*inline*/ static void pe_multiplex(NV tm) {
     if (SvIVX(DebugLevel) >= 2) {
 	warn("Event: multiplex %.4fs %s%s\n", tm,
 	     PE_RING_EMPTY(&NQueue)?"":"QUEUE",
@@ -109,12 +109,12 @@
     }
 }
 
-static double pe_map_prepare(double tm) {
+static NV pe_map_prepare(NV tm) {
     pe_qcallback *qcb = (pe_qcallback*) Prepare.prev->self;
     while (qcb) {
 	if (qcb->is_perl) {
 	    SV *got;
-	    double when;
+	    NV when;
 	    dSP;
 	    PUSHMARK(SP);
 	    PUTBACK;
@@ -126,7 +126,7 @@
 	    if (when < tm) tm = when;
 	}
 	else { /* !is_perl */
-	    double got = (* (double(*)(void*)) qcb->callback)(qcb->ext_data);
+	    NV got = (* (NV(*)(void*)) qcb->callback)(qcb->ext_data);
 	    if (got < tm) tm = got;
 	}
 	qcb = (pe_qcallback*) qcb->ring.prev->self;
@@ -135,7 +135,7 @@
 }
 
 static void pe_queue_pending() {
-    double tm = 0;
+    NV tm = 0;
     if (!PE_RING_EMPTY(&Prepare)) tm = pe_map_prepare(tm);
 
     pe_multiplex(0);
@@ -147,7 +147,7 @@
     if (!PE_RING_EMPTY(&AsyncCheck)) pe_map_check(&AsyncCheck);
 }
 
-static int one_event(double tm) {  /**INVOKE**/
+static int one_event(NV tm) {  /**INVOKE**/
     /*if (SvIVX(DebugLevel) >= 4)
       warn("Event: ActiveWatchers=%d\n", ActiveWatchers); /**/
 
@@ -160,7 +160,7 @@
 	tm = 0;
     }
     else {
-	double t1 = timeTillTimer();
+	NV t1 = timeTillTimer();
 	if (t1 < tm) tm = t1;
     }
     if (!PE_RING_EMPTY(&Prepare)) tm = pe_map_prepare(tm);
@@ -227,7 +227,7 @@
     }
 }
 
-static int safe_one_event(double maxtm) {
+static int safe_one_event(NV maxtm) {
     int got;
     pe_check_recovery();
     pe_reentry();

Modified: branches/upstream/libevent-perl/current/c/timeable.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/timeable.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/timeable.c (original)
+++ branches/upstream/libevent-perl/current/c/timeable.c Sat May 17 15:29:52 2008
@@ -3,29 +3,30 @@
 /*#define D_TIMEABLE(x) x /**/
 #define D_TIMEABLE(x) /**/
 
-/* BROQ
 static void db_show_timeables()
 {
-  pe_tmevent *ev;
-  ev = (pe_tmevent*) Timeables.next->self;
-  while (ev) {
-    warn("  %.2f : %s\n", ev->tm.at, SvPV(ev->base.desc, na));
-    ev = (pe_tmevent*) ev->tm.ring.next->self;
+  pe_timeable *tm = (pe_timeable*) Timeables.ring.next;
+  warn("timeables at %.2f\n", NVtime() + IntervalEpsilon);
+  while (tm->ring.self) {
+    STRLEN n_a;
+    pe_watcher *wa = (pe_watcher*) tm->ring.self;
+    pe_timeable *next = (pe_timeable*) tm->ring.next;
+    warn("  %.2f '%s'\n", tm->at, SvPV(wa->desc, n_a));
+    tm = next;
   }
 }
-*/
 
 static void pe_timeables_check() {
     pe_timeable *tm = (pe_timeable*) Timeables.ring.next;
-    double now = NVtime() + IntervalEpsilon;
-    /*  warn("timeables at %.2f\n", now); db_show_timeables();/**/
+    NV now = NVtime() + IntervalEpsilon;
+    /*db_show_timeables();/**/
     while (tm->ring.self && now >= tm->at) {
 	pe_watcher *ev = (pe_watcher*) tm->ring.self;
 	pe_timeable *next = (pe_timeable*) tm->ring.next;
 	D_TIMEABLE({
 	    if (WaDEBUGx(ev) >= 4) {
 		STRLEN n_a;
-		warn("Event: timeable expire '%s'\n", SvPV(ev->base.desc, n_a));
+		warn("Event: timeable expire '%s'\n", SvPV(ev->desc, n_a));
 	    }
 	})
 	    assert(!WaSUSPEND(ev));
@@ -36,7 +37,7 @@
     }
 }
 
-static double timeTillTimer() {
+static NV timeTillTimer() {
     pe_timeable *tm = (pe_timeable*) Timeables.ring.next;
     if (!tm->ring.self)
 	return 3600;
@@ -50,7 +51,7 @@
     assert(!WaSUSPEND(ev));
     assert(PE_RING_EMPTY(&tm->ring));
     if (WaDEBUGx(ev)) {
-	double left = tm->at - NVtime();
+	NV left = tm->at - NVtime();
 	if (left < 0) {
 	    STRLEN n_a;
 	    warn("Event: timer for '%s' set to expire immediately (%.2f)",
@@ -65,6 +66,7 @@
     /*warn("T:\n"); db_show_timeables();/**/
     D_TIMEABLE({
 	if (WaDEBUGx(ev) >= 4) {
+	    STRLEN n_a;
 	    warn("Event: timeable start '%s'\n", SvPV(ev->desc, n_a));
 	}
     })
@@ -81,7 +83,7 @@
     PE_RING_DETACH(&tm->ring);
 }
 
-static void pe_timeable_adjust(double delta) {
+static void pe_timeable_adjust(NV delta) {
     pe_timeable *rg = (pe_timeable*) Timeables.ring.next;
     while (rg != &Timeables) {
 	rg->at += delta;

Modified: branches/upstream/libevent-perl/current/c/timer.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/timer.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/timer.c (original)
+++ branches/upstream/libevent-perl/current/c/timer.c Sat May 17 15:29:52 2008
@@ -27,7 +27,7 @@
     if (repeat) {
 	/* We just finished the callback and need to re-insert at
 	   the appropriate time increment. */
-	double interval;
+	NV interval;
 
 	if (!sv_2interval("timer", tm->interval, &interval))
 	    return "repeating timer has no interval";

Modified: branches/upstream/libevent-perl/current/c/typemap.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/typemap.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/typemap.c (original)
+++ branches/upstream/libevent-perl/current/c/typemap.c Sat May 17 15:29:52 2008
@@ -131,9 +131,9 @@
 /***************************************************************/
 
 #define VERIFYINTERVAL(name, f) \
- STMT_START { double ign; sv_2interval(name, f, &ign); } STMT_END
-
-int sv_2interval(char *label, SV *in, double *out) {
+ STMT_START { NV ign; sv_2interval(name, f, &ign); } STMT_END
+
+int sv_2interval(char *label, SV *in, NV *out) {
     SV *sv = in;
     if (!sv) return 0;
     if (SvGMAGICAL(sv))

Modified: branches/upstream/libevent-perl/current/c/unix.c
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/c/unix.c?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/c/unix.c (original)
+++ branches/upstream/libevent-perl/current/c/unix.c Sat May 17 15:29:52 2008
@@ -73,10 +73,10 @@
 #if defined(HAS_DEVPOLL) && !PE_SYS_IO
 #define PE_SYS_IO 1
 
-static void pe_sys_sleep(double left) {
-    int ret;
-    double t0 = NVtime();
-    double t1 = t0 + left;
+static void pe_sys_sleep(NV left) {
+    int ret;
+    NV t0 = NVtime();
+    NV t1 = t0 + left;
     while (1) {
         ret = poll(0, 0, (int) (left * 1000)); /* hope zeroes okay */
         if (ret < 0 && errno != EAGAIN && errno != EINTR)
@@ -143,7 +143,7 @@
     fdToEvent[ev->fd].ev = NULL;
 }
 
-static void pe_sys_multiplex(double timeout) {
+static void pe_sys_multiplex(NV timeout) {
     pe_io *ev;
     int xx, got, mask, fd;
     int ret;
@@ -236,10 +236,10 @@
 static int pollMax=0;
 static int Nfds;
 
-static void pe_sys_sleep(double left) {
-    int ret;
-    double t0 = NVtime();
-    double t1 = t0 + left;
+static void pe_sys_sleep(NV left) {
+    int ret;
+    NV t0 = NVtime();
+    NV t1 = t0 + left;
     while (1) {
 	ret = poll(0, 0, (int) (left * 1000)); /* hope zeroes okay */
 	if (ret < 0 && errno != EAGAIN && errno != EINTR)
@@ -256,7 +256,7 @@
 static void pe_sys_io_add (pe_io *ev) {}
 static void pe_sys_io_del (pe_io *ev) {}
 
-static void pe_sys_multiplex(double timeout) {
+static void pe_sys_multiplex(NV timeout) {
     pe_io *ev;
     int xx;
     int ret;
@@ -352,10 +352,10 @@
 static int Nfds;
 static fd_set Rfds, Wfds, Efds;
 
-static void pe_sys_sleep(double left) {
+static void pe_sys_sleep(NV left) {
     struct timeval tm;
-    double t0 = NVtime();
-    double t1 = t0 + left;
+    NV t0 = NVtime();
+    NV t1 = t0 + left;
     int ret;
     while (1) {
 	tm.tv_sec = left;
@@ -375,7 +375,7 @@
 static void pe_sys_io_add (pe_io *ev) {}
 static void pe_sys_io_del (pe_io *ev) {}
 
-static void pe_sys_multiplex(double timeout) {
+static void pe_sys_multiplex(NV timeout) {
     struct timeval tm;
     int ret;
     fd_set rfds, wfds, efds;

Added: branches/upstream/libevent-perl/current/demo/idle2.t
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/demo/idle2.t?rev=20067&op=file
==============================================================================
--- branches/upstream/libevent-perl/current/demo/idle2.t (added)
+++ branches/upstream/libevent-perl/current/demo/idle2.t Sat May 17 15:29:52 2008
@@ -1,0 +1,54 @@
+# idle daydreams -*-perl-*-
+
+# This test is too sensitive to slight variations in timing
+# to serve as part of the test suite.
+
+BEGIN {
+    eval {
+	require Time::HiRes;
+	Time::HiRes->VERSION(1.20);
+    };
+    if ($@) {
+	print "1..0\n";
+	print "ok 1 # skipped; requires Time::HiRes 1.20\n";
+	exit;
+    }
+}
+
+use Test; plan tests => 5;
+use Event qw(loop unloop time all_events one_event);
+
+# $Event::Eval = 1;
+# $Event::DebugLevel = 4;
+$Event::DIED = \&Event::verbose_exception_handler;
+
+#----------- complex idle events; fuzzy timers
+
+my ($cnt,$min,$max,$sum) = (0)x4;
+my $prev;
+$min = 100;
+my $Min = .01;
+my $Max = .2;
+Event->idle(min => $Min, max => $Max, desc => "*IDLE*TEST*",
+	    cb => sub {
+		my $now = time;
+		if (!$prev) { $prev = time; return }
+		my $d = $now - $prev;
+		$prev = $now;
+		$sum += $d;
+		$min = $d if $d < $min;
+		$max = $d if $d > $max;
+		unloop('done') if ++$cnt > 10;
+	    });
+my $sleeps=0;
+Event->idle(repeat => 1, cb => sub { Event::sleep $Min; ++$sleeps });
+
+Event::sleep .1; # try to let CPU settle
+loop();
+
+my $epsilon = .05;
+ok $sleeps > 1; #did we test anything?
+ok $min >= $Min-$epsilon;
+ok $max < $Max+$epsilon;   # fails without high resolution clock XXX
+ok $sum/$cnt >= $min;
+ok $sum/$cnt <= $max;

Modified: branches/upstream/libevent-perl/current/lib/Event.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/lib/Event.pm?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/lib/Event.pm (original)
+++ branches/upstream/libevent-perl/current/lib/Event.pm Sat May 17 15:29:52 2008
@@ -14,7 +14,7 @@
 eval { require Carp::Heavy; };  # work around perl_call_pv bug XXX
 use vars qw($VERSION @EXPORT_OK
 	    $API $DebugLevel $Eval $DIED $Now);
-$VERSION = '1.10';
+$VERSION = '1.11';
 
 # If we inherit DynaLoader then we inherit AutoLoader; Bletch!
 require DynaLoader;

Modified: branches/upstream/libevent-perl/current/lib/Event/EventAPI.h
URL: http://svn.debian.org/wsvn/branches/upstream/libevent-perl/current/lib/Event/EventAPI.h?rev=20067&op=diff
==============================================================================
--- branches/upstream/libevent-perl/current/lib/Event/EventAPI.h (original)
+++ branches/upstream/libevent-perl/current/lib/Event/EventAPI.h Sat May 17 15:29:52 2008
@@ -18,7 +18,7 @@
 struct pe_watcher {
     pe_watcher_vtbl *vtbl;
     SV *mysv;
-    double cbtime; /* float? XXX */
+    NV cbtime; /* float? XXX */
     void *callback;
     void *ext_data;
     void *stats;
@@ -51,7 +51,7 @@
 typedef struct pe_timeable pe_timeable;
 struct pe_timeable {
     pe_ring ring;
-    double at;
+    NV at;
 };
 
 typedef struct pe_qcallback pe_qcallback;
@@ -162,7 +162,7 @@
 typedef struct pe_group pe_group;
 struct pe_group {
     pe_watcher base;
-    double since;
+    NV since;
     pe_timeable tm;
     SV *timeout;
     int members;
@@ -216,7 +216,7 @@
     pe_signal   *(*new_signal)(HV*, SV*);
 
     /* TIMEABLE */
-    double (*NVtime)();
+    NV (*NVtime)();
     void (*tstart)(pe_timeable *);
     void (*tstop)(pe_timeable *);
 
@@ -234,7 +234,7 @@
     void *(*sv_2watcher)(SV *sv);
     SV   *(*event_2sv)(pe_event *ev);
     void *(*sv_2event)(SV *sv);
-    int   (*sv_2interval)(char *label, SV *in, double *out);
+    int   (*sv_2interval)(char *label, SV *in, NV *out);
     SV   *(*events_mask_2sv)(int mask);
     int   (*sv_2events_mask)(SV *sv, int bits);
 




More information about the Pkg-perl-cvs-commits mailing list