surro-gate 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90e1123d3d92d4d2aa63a242e70b1cb892841f55
4
- data.tar.gz: f49f4c35d280a89d1baf88b1bcca0ad4289d3320
3
+ metadata.gz: 0dff2c5d49b4f6ec6957975c20f3d5d67c6496e8
4
+ data.tar.gz: 221e9f83d022c0e8455d73a03f37a8db7cb17ae8
5
5
  SHA512:
6
- metadata.gz: 69ab774b8c3c9de0839cfaf00d63b0ba73e614ba058cee91f0bb6460726f32f2fc92261b3e3591b8662f3ae3735221eeca2adffca246a37e937c9850afd6003a
7
- data.tar.gz: 6d4009bcaa479bd414a0dcf039e3a32d11f2a913041f560b8fc33c2486ef6f4ef76ffc4c8e25e17ab5b0d576be71e1a12998000273756682b30040886e675098
6
+ metadata.gz: 1f9bb8935d3080111a210a7f0cf145157fef9ac6d407dbbae74f4c9e84073e20e42b2200d0aff59e71c7818adcf934b21d97644711a4da4dc5214ba1903d98c6
7
+ data.tar.gz: 899313a5436eebebffd2b8694600c4b246211550c60ffc3ff017ce339ba2ee174aa4891598b704e56b8155971479da1b8ec86689687bc194a7666b0c080657d0
@@ -60,9 +60,9 @@ static VALUE pairing_iterate(VALUE pair, VALUE self, int argc, VALUE *argv) {
60
60
 
61
61
  Data_Get_Struct(self, int, selector);
62
62
  // Rearm left socket for reading and also writing if not ready for writing
63
- epoll_rearm(selector, SOCK_PTR(rb_iv_get(pair, "@left")), NUM2INT(argv[1]), NUM2INT(inv_idx), EPOLLIN | (IVAR_TRUE(inverse, "@wr_rdy") ? 0 : EPOLLOUT));
63
+ epoll_rearm(selector, SOCK_PTR(rb_iv_get(pair, "@left")), NUM2INT(inv_idx), NUM2INT(argv[1]), EPOLLIN | (IVAR_TRUE(inverse, "@wr_rdy") ? 0 : EPOLLOUT));
64
64
  // Rearm right socket for writing and also reading if not ready for reading
65
- epoll_rearm(selector, SOCK_PTR(rb_iv_get(pair, "@right")), NUM2INT(inv_idx), NUM2INT(argv[1]), EPOLLOUT | (IVAR_TRUE(inverse, "@rd_rdy") ? 0 : EPOLLIN));
65
+ epoll_rearm(selector, SOCK_PTR(rb_iv_get(pair, "@right")), NUM2INT(argv[1]), NUM2INT(inv_idx), EPOLLOUT | (IVAR_TRUE(inverse, "@rd_rdy") ? 0 : EPOLLIN));
66
66
  }
67
67
  return Qnil;
68
68
  }
@@ -167,8 +167,8 @@ static VALUE SurroGate_Selector_select(VALUE self, VALUE timeout) {
167
167
  source = (int)((events[i].data.u64 & 0xFFFFFFFF00000000LL) >> 32);
168
168
  target = (int)(events[i].data.u64 & 0xFFFFFFFFLL);
169
169
 
170
- read = rb_funcall(pairing, rb_intern("[]"), 1, INT2NUM(target)); // @pairing[source]
171
- write = rb_funcall(pairing, rb_intern("[]"), 1, INT2NUM(source)); // @pairing[target]
170
+ read = rb_funcall(pairing, rb_intern("[]"), 1, INT2NUM(target)); // @pairing[target]
171
+ write = rb_funcall(pairing, rb_intern("[]"), 1, INT2NUM(source)); // @pairing[source]
172
172
 
173
173
  if (events[i].events & EPOLLIN && events[i].events & EPOLLOUT) {
174
174
  // Socket is both available for read and write
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SurroGate
4
- VERSION = '1.0.1'.freeze
4
+ VERSION = '1.0.2'.freeze
5
5
  HAVE_EXT = RUBY_PLATFORM =~ /linux/ && !defined?(JRUBY_VERSION) && !ENV['SURRO_GATE_NOEXT']
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surro-gate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dávid Halász
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby