ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV.xs
(Generate patch)

Comparing EV/EV.xs (file contents):
Revision 1.4 by root, Fri Oct 26 18:21:32 2007 UTC vs.
Revision 1.7 by root, Sat Oct 27 14:54:21 2007 UTC

116 116
117 if (ev->abstime) 117 if (ev->abstime)
118 { 118 {
119 double now = e_now (); 119 double now = e_now ();
120 120
121 if (now > to && ev->interval) 121 if (ev->interval)
122 ev->timeout = (to += ceil ((now - to) / ev->interval) * ev->interval); 122 ev->timeout = (to += ceil ((now - to) / ev->interval) * ev->interval);
123 123
124 to -= now; 124 to -= now;
125 } 125 }
126 else if (to < 0.) 126 else if (to < 0.)
169 dSP; 169 dSP;
170 170
171 ENTER; 171 ENTER;
172 SAVETMPS; 172 SAVETMPS;
173 173
174 if (!(ev->ev.ev_events & EV_PERSIST)) 174 if (!(ev->ev.ev_events & EV_PERSIST) || (events & EV_TIMEOUT))
175 ev->active = 0; 175 ev->active = 0;
176 176
177 PUSHMARK (SP); 177 PUSHMARK (SP);
178 EXTEND (SP, 2); 178 EXTEND (SP, 2);
179 PUSHs (sv_2mortal (e_self (ev))); 179 PUSHs (sv_2mortal (e_self (ev)));
480 static const struct { 480 static const struct {
481 const char *name; 481 const char *name;
482 IV iv; 482 IV iv;
483 } *civ, const_iv[] = { 483 } *civ, const_iv[] = {
484# define const_iv(pfx, name) { # name, (IV) pfx ## name }, 484# define const_iv(pfx, name) { # name, (IV) pfx ## name },
485
486 const_iv (DNS_, ERR_NONE) 485 const_iv (DNS_, ERR_NONE)
487 const_iv (DNS_, ERR_FORMAT) 486 const_iv (DNS_, ERR_FORMAT)
488 const_iv (DNS_, ERR_SERVERFAILED) 487 const_iv (DNS_, ERR_SERVERFAILED)
489 const_iv (DNS_, ERR_NOTEXIST) 488 const_iv (DNS_, ERR_NOTEXIST)
490 const_iv (DNS_, ERR_NOTIMPL) 489 const_iv (DNS_, ERR_NOTIMPL)
561 560
562void evdns_search_add (char *domain) 561void evdns_search_add (char *domain)
563 562
564void evdns_search_ndots_set (int ndots) 563void evdns_search_ndots_set (int ndots)
565 564
565
566MODULE = EV PACKAGE = EV::HTTP PREFIX = evhttp_
567
568BOOT:
569{
570 HV *stash = gv_stashpv ("EV::HTTP", 1);
571
572 static const struct {
573 const char *name;
574 IV iv;
575 } *civ, const_iv[] = {
576# define const_iv(pfx, name) { # name, (IV) pfx ## name },
577 const_iv (HTTP_, OK)
578 const_iv (HTTP_, NOCONTENT)
579 const_iv (HTTP_, MOVEPERM)
580 const_iv (HTTP_, MOVETEMP)
581 const_iv (HTTP_, NOTMODIFIED)
582 const_iv (HTTP_, BADREQUEST)
583 const_iv (HTTP_, NOTFOUND)
584 const_iv (HTTP_, SERVUNAVAIL)
585 const_iv (EVHTTP_, REQ_OWN_CONNECTION)
586 const_iv (EVHTTP_, PROXY_REQUEST)
587 const_iv (EVHTTP_, REQ_GET)
588 const_iv (EVHTTP_, REQ_POST)
589 const_iv (EVHTTP_, REQ_HEAD)
590 const_iv (EVHTTP_, REQUEST)
591 const_iv (EVHTTP_, RESPONSE)
592 };
593
594 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
595 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
596}
597
598MODULE = EV PACKAGE = EV::HTTP::Request PREFIX = evhttp_request_
599
600#HttpRequest new (SV *klass, SV *cb)
601
602#void DESTROY (struct evhttp_request *req);
603
604
605
606
607
608
609
610

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines