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

Comparing EV-ADNS/ADNS.xs (file contents):
Revision 1.6 by root, Sat Dec 1 20:52:30 2007 UTC vs.
Revision 1.7 by root, Sat Dec 1 21:01:32 2007 UTC

48 c = (struct ctx *)ctx; 48 c = (struct ctx *)ctx;
49 cb = c->cb; 49 cb = c->cb;
50 c->cb = 0; 50 c->cb = 0;
51 ev_unref (); 51 ev_unref ();
52 SvREFCNT_dec (c->self); 52 SvREFCNT_dec (c->self);
53 printf ("refrefclr\n");
54 53
55 PUSHMARK (SP); 54 PUSHMARK (SP);
56 55
57 EXTEND (SP, a->nrrs + 2); 56 EXTEND (SP, a->nrrs + 2);
58 PUSHs (sv_2mortal (newSViv (a->status))); 57 PUSHs (sv_2mortal (newSViv (a->status)));
253 252
254 while (adns_beforepoll (ads, fds, &nfd, &timeout, &tv_now)) 253 while (adns_beforepoll (ads, fds, &nfd, &timeout, &tv_now))
255 { 254 {
256 mfd = nfd; 255 mfd = nfd;
257 256
257 free (iow); iow = malloc (mfd * sizeof (ev_io));
258 free (iow); iow = malloc (mfd * sizeof (struct pollfd)); 258 free (fds); fds = malloc (mfd * sizeof (struct pollfd));
259 free (fds); fds = malloc (mfd * sizeof (ev_io));
260 } 259 }
261 260
262 ev_timer_set (&tw, timeout * 1e-3, 0.); 261 ev_timer_set (&tw, timeout * 1e-3, 0.);
263 ev_timer_start (EV_A_ &tw); 262 ev_timer_start (EV_A_ &tw);
264 ev_unref (); 263 ev_unref ();
415 cancel = 1 414 cancel = 1
416 CODE: 415 CODE:
417{ 416{
418 struct ctx *c; 417 struct ctx *c;
419 418
420 printf ("destroy\n");
421 if (!(SvROK (req) && SvOBJECT (SvRV (req)) 419 if (!(SvROK (req) && SvOBJECT (SvRV (req))
422 && (SvSTASH (SvRV (req)) == stash))) 420 && (SvSTASH (SvRV (req)) == stash)))
423 croak ("object is not of type EV::ADNS"); 421 croak ("object is not of type EV::ADNS");
424 422
425 c = (struct ctx *)SvPVX (SvRV (req)); 423 c = (struct ctx *)SvPVX (SvRV (req));
429 ev_unref (); 427 ev_unref ();
430 SvREFCNT_dec (c->cb); 428 SvREFCNT_dec (c->cb);
431 c->cb = 0; 429 c->cb = 0;
432 adns_cancel (c->query); 430 adns_cancel (c->query);
433 SvREFCNT_dec (c->self); 431 SvREFCNT_dec (c->self);
434 printf ("refrefcl2\n");
435 } 432 }
436} 433}
437 434
438 435
439 436

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines