… | |
… | |
85 | { |
85 | { |
86 | #if EV_MULTIPLICITY |
86 | #if EV_MULTIPLICITY |
87 | if (x_cur) |
87 | if (x_cur) |
88 | x_cur = (struct event_base *)ev_loop_new (EVMETHOD_AUTO); |
88 | x_cur = (struct event_base *)ev_loop_new (EVMETHOD_AUTO); |
89 | else |
89 | else |
90 | x_cur = ev_default_loop (EVMETHOD_AUTO); |
90 | x_cur = (struct event_base *)ev_default_loop (EVMETHOD_AUTO); |
91 | #else |
91 | #else |
92 | assert (("multiple event bases not supported when not compiled with EV_MULTIPLICITY", !x_cur)); |
92 | assert (("multiple event bases not supported when not compiled with EV_MULTIPLICITY", !x_cur)); |
93 | |
93 | |
94 | x_cur = (struct event_base *)ev_default_loop (EVMETHOD_AUTO); |
94 | x_cur = (struct event_base *)ev_default_loop (EVMETHOD_AUTO); |
95 | #endif |
95 | #endif |
… | |
… | |
100 | void event_base_free (struct event_base *base) |
100 | void event_base_free (struct event_base *base) |
101 | { |
101 | { |
102 | dLOOPbase; |
102 | dLOOPbase; |
103 | |
103 | |
104 | #if EV_MULTIPLICITY |
104 | #if EV_MULTIPLICITY |
|
|
105 | if (ev_default_loop (EVMETHOD_AUTO) != loop) |
105 | ev_loop_delete (loop); |
106 | ev_loop_destroy (loop); |
106 | #endif |
107 | #endif |
107 | } |
108 | } |
108 | |
109 | |
109 | int event_dispatch (void) |
110 | int event_dispatch (void) |
110 | { |
111 | { |
… | |
… | |
352 | return 0; |
353 | return 0; |
353 | } |
354 | } |
354 | |
355 | |
355 | int event_base_priority_init (struct event_base *base, int npri) |
356 | int event_base_priority_init (struct event_base *base, int npri) |
356 | { |
357 | { |
357 | dLOOPbase; |
358 | /*dLOOPbase;*/ |
358 | |
359 | |
359 | return 0; |
360 | return 0; |
360 | } |
361 | } |
361 | |
362 | |