@@ -199,7 +199,7 @@ static void libuv_close_handle_cb(uv_handle_t *handle)
199199/* {{{ libuv_close_poll_handle_cb */
200200static void libuv_close_poll_handle_cb (uv_handle_t * handle )
201201{
202- async_poll_event_t * poll = (async_poll_event_t * )handle -> data ;
202+ async_poll_event_t * poll = (async_poll_event_t * ) handle -> data ;
203203
204204 /* Check if PHP requested descriptor closure after event cleanup */
205205 if (ZEND_ASYNC_EVENT_SHOULD_CLOSE_FD (& poll -> event .base )) {
@@ -213,7 +213,7 @@ static void libuv_close_poll_handle_cb(uv_handle_t *handle)
213213 } else if (!poll -> event .is_socket && poll -> event .file != ZEND_FD_NULL ) {
214214 /* File descriptor cleanup */
215215#ifdef PHP_WIN32
216- CloseHandle ((HANDLE )poll -> event .file );
216+ CloseHandle ((HANDLE ) poll -> event .file );
217217#else
218218 close (poll -> event .file );
219219#endif
@@ -246,7 +246,8 @@ static void libuv_remove_callback(zend_async_event_t *event, zend_async_event_ca
246246//////////////////////////////////////////////////////////////////////////////
247247
248248/* Forward declaration */
249- static zend_always_inline void async_poll_notify_proxies (async_poll_event_t * poll , async_poll_event triggered_events , zend_object * exception );
249+ static zend_always_inline void
250+ async_poll_notify_proxies (async_poll_event_t * poll , async_poll_event triggered_events , zend_object * exception );
250251
251252/* {{{ on_poll_event */
252253static void on_poll_event (uv_poll_t * handle , int status , int events )
@@ -359,7 +360,8 @@ static void libuv_poll_dispose(zend_async_event_t *event)
359360/* }}} */
360361
361362/* {{{ async_poll_notify_proxies */
362- static zend_always_inline void async_poll_notify_proxies (async_poll_event_t * poll , async_poll_event triggered_events , zend_object * exception )
363+ static zend_always_inline void
364+ async_poll_notify_proxies (async_poll_event_t * poll , async_poll_event triggered_events , zend_object * exception )
363365{
364366 /* Process each proxy that matches triggered events */
365367 for (uint32_t i = 0 ; i < poll -> proxies_count ; i ++ ) {
@@ -381,6 +383,7 @@ static zend_always_inline void async_poll_notify_proxies(async_poll_event_t *pol
381383 }
382384 }
383385}
386+
384387/* }}} */
385388
386389/* {{{ async_poll_add_proxy */
@@ -394,11 +397,12 @@ static zend_always_inline void async_poll_add_proxy(async_poll_event_t *poll, ze
394397 if (poll -> proxies_count == poll -> proxies_capacity ) {
395398 poll -> proxies_capacity *= 2 ;
396399 poll -> proxies = (zend_async_poll_proxy_t * * ) perealloc (
397- poll -> proxies , poll -> proxies_capacity * sizeof (zend_async_poll_proxy_t * ), 0 );
400+ poll -> proxies , poll -> proxies_capacity * sizeof (zend_async_poll_proxy_t * ), 0 );
398401 }
399402
400403 poll -> proxies [poll -> proxies_count ++ ] = proxy ;
401404}
405+
402406/* }}} */
403407
404408/* {{{ async_poll_remove_proxy */
@@ -412,6 +416,7 @@ static zend_always_inline void async_poll_remove_proxy(async_poll_event_t *poll,
412416 }
413417 }
414418}
419+
415420/* }}} */
416421
417422/* {{{ async_poll_aggregate_events */
@@ -430,6 +435,7 @@ static zend_always_inline async_poll_event async_poll_aggregate_events(async_pol
430435
431436 return aggregated ;
432437}
438+
433439/* }}} */
434440
435441/* {{{ libuv_poll_proxy_start */
@@ -438,7 +444,7 @@ static void libuv_poll_proxy_start(zend_async_event_t *event)
438444 EVENT_START_PROLOGUE (event );
439445
440446 zend_async_poll_proxy_t * proxy = (zend_async_poll_proxy_t * ) event ;
441- async_poll_event_t * poll = (async_poll_event_t * )proxy -> poll_event ;
447+ async_poll_event_t * poll = (async_poll_event_t * ) proxy -> poll_event ;
442448
443449 /* Add proxy to the array */
444450 async_poll_add_proxy (poll , proxy );
@@ -459,6 +465,7 @@ static void libuv_poll_proxy_start(zend_async_event_t *event)
459465 ZEND_ASYNC_INCREASE_EVENT_COUNT ;
460466 event -> loop_ref_count = 1 ;
461467}
468+
462469/* }}} */
463470
464471/* {{{ libuv_poll_proxy_stop */
@@ -467,7 +474,7 @@ static void libuv_poll_proxy_stop(zend_async_event_t *event)
467474 EVENT_STOP_PROLOGUE (event );
468475
469476 zend_async_poll_proxy_t * proxy = (zend_async_poll_proxy_t * ) event ;
470- async_poll_event_t * poll = (async_poll_event_t * )proxy -> poll_event ;
477+ async_poll_event_t * poll = (async_poll_event_t * ) proxy -> poll_event ;
471478
472479 /* Remove proxy from the array */
473480 async_poll_remove_proxy (poll , proxy );
@@ -490,6 +497,7 @@ static void libuv_poll_proxy_stop(zend_async_event_t *event)
490497 event -> loop_ref_count = 0 ;
491498 ZEND_ASYNC_DECREASE_EVENT_COUNT ;
492499}
500+
493501/* }}} */
494502
495503/* {{{ libuv_poll_proxy_dispose */
@@ -501,7 +509,7 @@ static void libuv_poll_proxy_dispose(zend_async_event_t *event)
501509 }
502510
503511 zend_async_poll_proxy_t * proxy = (zend_async_poll_proxy_t * ) event ;
504- async_poll_event_t * poll = (async_poll_event_t * )proxy -> poll_event ;
512+ async_poll_event_t * poll = (async_poll_event_t * ) proxy -> poll_event ;
505513
506514 if (event -> loop_ref_count > 0 ) {
507515 event -> loop_ref_count = 1 ;
@@ -515,6 +523,7 @@ static void libuv_poll_proxy_dispose(zend_async_event_t *event)
515523
516524 pefree (proxy , 0 );
517525}
526+
518527/* }}} */
519528
520529/* {{{ libuv_new_poll_event */
@@ -578,12 +587,13 @@ zend_async_poll_event_t *libuv_new_socket_event(zend_socket_t socket, async_poll
578587/* }}} */
579588
580589/* {{{ libuv_new_poll_proxy_event */
581- zend_async_poll_proxy_t * libuv_new_poll_proxy_event (zend_async_poll_event_t * poll_event , async_poll_event events , size_t extra_size )
590+ zend_async_poll_proxy_t *
591+ libuv_new_poll_proxy_event (zend_async_poll_event_t * poll_event , async_poll_event events , size_t extra_size )
582592{
583593 START_REACTOR_OR_RETURN_NULL ;
584594
585- zend_async_poll_proxy_t * proxy =
586- pecalloc ( 1 , extra_size != 0 ? sizeof (zend_async_poll_proxy_t ) + extra_size : sizeof (zend_async_poll_proxy_t ), 0 );
595+ zend_async_poll_proxy_t * proxy = pecalloc (
596+ 1 , extra_size != 0 ? sizeof (zend_async_poll_proxy_t ) + extra_size : sizeof (zend_async_poll_proxy_t ), 0 );
587597
588598 /* Set up proxy */
589599 proxy -> poll_event = poll_event ;
0 commit comments