diff --git a/ext/nio4r/bytebuffer.c b/ext/nio4r/bytebuffer.c index 2bd7635..e3462c0 100644 --- a/ext/nio4r/bytebuffer.c +++ b/ext/nio4r/bytebuffer.c @@ -305,7 +305,7 @@ static VALUE NIO_ByteBuffer_read_from(VALUE self, VALUE io) buffer->position += bytes_read; - return INT2NUM(bytes_read); + return SIZET2NUM(bytes_read); } static VALUE NIO_ByteBuffer_write_to(VALUE self, VALUE io) @@ -335,7 +335,7 @@ static VALUE NIO_ByteBuffer_write_to(VALUE self, VALUE io) buffer->position += bytes_written; - return INT2NUM(bytes_written); + return SIZET2NUM(bytes_written); } static VALUE NIO_ByteBuffer_flip(VALUE self) diff --git a/ext/nio4r/monitor.c b/ext/nio4r/monitor.c index 2958aa3..cf9074f 100644 --- a/ext/nio4r/monitor.c +++ b/ext/nio4r/monitor.c @@ -182,7 +182,7 @@ static VALUE NIO_Monitor_add_interest(VALUE self, VALUE interest) Data_Get_Struct(self, struct NIO_Monitor, monitor); interest = monitor->interests | NIO_Monitor_symbol2interest(interest); - NIO_Monitor_update_interests(self, interest); + NIO_Monitor_update_interests(self, (int)interest); return rb_ivar_get(self, rb_intern("interests")); } @@ -193,7 +193,7 @@ static VALUE NIO_Monitor_remove_interest(VALUE self, VALUE interest) Data_Get_Struct(self, struct NIO_Monitor, monitor); interest = monitor->interests & ~NIO_Monitor_symbol2interest(interest); - NIO_Monitor_update_interests(self, interest); + NIO_Monitor_update_interests(self, (int)interest); return rb_ivar_get(self, rb_intern("interests")); } diff --git a/lib/nio/version.rb b/lib/nio/version.rb index a82f86f..e6531ef 100644 --- a/lib/nio/version.rb +++ b/lib/nio/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module NIO - VERSION = "2.5.9" + VERSION = "2.6.0" end