--- libev/ev++.h 2008/01/22 17:56:54 1.34 +++ libev/ev++.h 2008/01/28 11:43:37 1.38 @@ -132,19 +132,12 @@ struct loop_ref { - - loop_ref (EV_P) + loop_ref (EV_P) throw () #if EV_MULTIPLICITY - throw (bad_loop) : EV_AX (EV_A) - { - if (!EV_AX) - throw bad_loop (); - } -#else - throw () + : EV_AX (EV_A) +#endif { } -#endif bool operator == (const loop_ref &other) const throw () { @@ -165,22 +158,22 @@ } #if EV_MULTIPLICITY - bool operator== (struct ev_loop *other) const throw () + bool operator == (struct ev_loop *other) const throw () { return this->EV_AX == other; } - bool operator!= (struct ev_loop *other) const throw () + bool operator != (struct ev_loop *other) const throw () { return ! (*this == other); } - bool operator== (const struct ev_loop *other) const throw () + bool operator == (const struct ev_loop *other) const throw () { return this->EV_AX == other; } - bool operator!= (const struct ev_loop *other) const throw () + bool operator != (const struct ev_loop *other) const throw () { return (*this == other); } @@ -346,12 +339,14 @@ }; #if EV_MULTIPLICITY - struct dynamic_loop: loop_ref + struct dynamic_loop : loop_ref { dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) - : loop_ref (ev_loop_new (flags)) + : loop_ref (ev_loop_new (flags)) { + if (!EV_AX) + throw bad_loop (); } ~dynamic_loop () throw () @@ -369,18 +364,21 @@ }; #endif - struct default_loop: loop_ref + struct default_loop : loop_ref { - default_loop (unsigned int flags = AUTO) throw (bad_loop) #if EV_MULTIPLICITY : loop_ref (ev_default_loop (flags)) #endif { -#ifndef EV_MULTIPLICITY - if (!ev_default_loop (flags)) - throw bad_loop (); + if ( +#if EV_MULTIPLICITY + !EV_AX +#else + !ev_default_loop (flags) #endif + ) + throw bad_loop (); } ~default_loop () throw () @@ -697,17 +695,17 @@ EV_END_WATCHER (sig, signal) EV_BEGIN_WATCHER (child, child) - void set (int pid) throw () + void set (int pid, int trace = 0) throw () { int active = is_active (); if (active) stop (); - ev_child_set (static_cast(this), pid); + ev_child_set (static_cast(this), pid, trace); if (active) start (); } - void start (int pid) throw () + void start (int pid, int trace = 0) throw () { - set (pid); + set (pid, trace); start (); } EV_END_WATCHER (child, child) @@ -775,7 +773,6 @@ #undef EV_CONSTRUCT #undef EV_BEGIN_WATCHER #undef EV_END_WATCHER - } #endif