ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.54 by root, Sun Nov 4 00:24:16 2007 UTC vs.
Revision 1.55 by root, Sun Nov 4 00:39:24 2007 UTC

130{ 130{
131 W w; 131 W w;
132 int events; 132 int events;
133} ANPENDING; 133} ANPENDING;
134 134
135#ifdef EV_MULTIPLICITY 135#if EV_MULTIPLICITY
136 136
137struct ev_loop 137struct ev_loop
138{ 138{
139# define VAR(name,decl) decl; 139# define VAR(name,decl) decl;
140# include "ev_vars.h" 140# include "ev_vars.h"
542ev_method (EV_P) 542ev_method (EV_P)
543{ 543{
544 return method; 544 return method;
545} 545}
546 546
547static void 547inline int
548loop_init (EV_P_ int methods) 548loop_init (EV_P_ int methods)
549{ 549{
550 if (!method) 550 if (!method)
551 { 551 {
552#if EV_USE_MONOTONIC 552#if EV_USE_MONOTONIC
601 } 601 }
602 602
603 return method; 603 return method;
604} 604}
605 605
606#ifdef EV_MULTIPLICITY 606#if EV_MULTIPLICITY
607 607
608struct ev_loop * 608struct ev_loop *
609ev_loop_new (int methods) 609ev_loop_new (int methods)
610{ 610{
611 struct ev_loop *loop = (struct ev_loop *)calloc (1, sizeof (struct ev_loop)); 611 struct ev_loop *loop = (struct ev_loop *)calloc (1, sizeof (struct ev_loop));
612 612
613 loop_init (EV_A_ methods); 613 if (loop_init (EV_A_ methods))
614
615 return loop; 614 return loop;
615
616 ev_loop_delete (loop);
617
618 return 0;
616} 619}
617 620
618void 621void
619ev_loop_delete (EV_P) 622ev_loop_delete (EV_P)
620{ 623{
625#else 628#else
626 629
627int 630int
628ev_init (int methods) 631ev_init (int methods)
629{ 632{
630 loop_init (); 633 return loop_init (methods);
631} 634}
632 635
633#endif 636#endif
634 637
635/*****************************************************************************/ 638/*****************************************************************************/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines