mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
picoev: remove fmt off tags (#20569)
This commit is contained in:
parent
43e96ce5bb
commit
43fd568874
4 changed files with 34 additions and 28 deletions
|
@ -51,13 +51,15 @@ pub fn create_kqueue_loop(id int) !&KqueueLoop {
|
|||
// ev_set sets a new `kevent` with file descriptor `index`
|
||||
@[inline]
|
||||
pub fn (mut pv Picoev) ev_set(index int, operation int, events int) {
|
||||
// vfmt off
|
||||
filter := i16(
|
||||
(if events & picoev_read != 0 { C.EVFILT_READ } else { 0 })
|
||||
|
|
||||
(if events & picoev_write != 0 { C.EVFILT_WRITE } else { 0 })
|
||||
)
|
||||
// vfmt on
|
||||
mut filter := 0
|
||||
if events & picoev_read != 0 {
|
||||
filter |= C.EVFILT_READ
|
||||
}
|
||||
if events & picoev_write != 0 {
|
||||
filter |= C.EVFILT_WRITE
|
||||
}
|
||||
filter = i16(filter)
|
||||
|
||||
C.EV_SET(&pv.loop.changelist[index], pv.loop.changed_fds, filter, operation, 0, 0,
|
||||
0)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue