about summary refs log tree commit diff stats
path: root/src/buffer/buffer.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-03 18:00:29 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-03 18:00:29 +0200
commit6372f3bd156bd24e53ae418bfc04ffceb45139f1 (patch)
tree219045e87b8e264392e085c69862b359fa176e3c /src/buffer/buffer.nim
parent307003b8043998283ea0d7a64bcd5f8c2c3f554d (diff)
downloadchawan-6372f3bd156bd24e53ae418bfc04ffceb45139f1.tar.gz
Fix JS type conversion regressions
Diffstat (limited to 'src/buffer/buffer.nim')
-rw-r--r--src/buffer/buffer.nim9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buffer/buffer.nim b/src/buffer/buffer.nim
index 9b464dfd..59c12a14 100644
--- a/src/buffer/buffer.nim
+++ b/src/buffer/buffer.nim
@@ -1206,9 +1206,12 @@ proc handleError(buffer: Buffer, fd: int, err: OSErrorCode) =
 proc runBuffer(buffer: Buffer, rfd: int) =
   buffer.rfd = rfd
   while buffer.alive:
-    {.warning[CastSizes]:off.} # not our bug. TODO remove when fixed
-    let events = buffer.selector.select(-1)
-    {.warning[CastSizes]:on.}
+    when defined(CastSizes):
+      {.warning[CastSizes]:off.} # not our bug. TODO remove when fixed
+      let events = buffer.selector.select(-1)
+      {.warning[CastSizes]:on.}
+    else:
+      let events = buffer.selector.select(-1)
     for event in events:
       if Read in event.events:
         buffer.handleRead(event.fd)