hiredis 0.5.0 → 0.5.1

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: d434e6b09126833f2a6dcf82385105de08f629dd
4
- data.tar.gz: 2d668be20b90a469f8f905f5915868e143cf5ae4
3
+ metadata.gz: 96f77b981784a483844d0f71fb48594a0a79fced
4
+ data.tar.gz: e6c6f088e0feb373de9097838de379870413791b
5
5
  SHA512:
6
- metadata.gz: 637b4bc535ceca4c61aff1f3a1d7456819dc9abdfc934618eac3f8c66b2d791a8106197c552ee6a8635611bcb8588cebb4d183a0de60e21ad4b8b10a29f494eb
7
- data.tar.gz: 5170e3ae0d95f728b2ca8566717de256aba4a4e3f804618a968ce81bbe8e3fca5b57942fe3d050441c10fe44aaf3f3c140ed7d8c99bc45e153033cb34884ad99
6
+ metadata.gz: 7bc1f73b803eab73504898440c7cbe001abacad798e94b21d683178ec7d6b12a6104b5a5a6f53949dc571625a5a8ccca3576c04a700478d25a3da0e82577e546
7
+ data.tar.gz: e89b77e064f841199206d5ced3f272120ac59e2234d79e947fdfe25fb61370407b215682e857785ae3b46681d3398f37bf54a2a7afe24e0218e6010f44aaed94
@@ -110,16 +110,20 @@ static int __wait_readable(int fd, const struct timeval *timeout, int *isset) {
110
110
  struct timeval *toptr = NULL;
111
111
 
112
112
  _fdset_t fds;
113
+
114
+ /* Be cautious: a call to rb_fd_init to initialize the rb_fdset_t structure
115
+ * must be paired with a call to rb_fd_term to free it. */
113
116
  _fd_init(&fds);
114
117
  _fd_set(fd, &fds);
115
118
 
116
- /* rb_fd_select modifies the passed timeval, so we pass a copy */
119
+ /* rb_thread_{fd_,}select modifies the passed timeval, so we pass a copy */
117
120
  if (timeout != NULL) {
118
121
  memcpy(&to, timeout, sizeof(to));
119
122
  toptr = &to;
120
123
  }
121
124
 
122
125
  if (_thread_fd_select(fd + 1, &fds, NULL, NULL, toptr) < 0) {
126
+ _fd_term(&fds);
123
127
  return -1;
124
128
  }
125
129
 
@@ -127,6 +131,7 @@ static int __wait_readable(int fd, const struct timeval *timeout, int *isset) {
127
131
  *isset = 1;
128
132
  }
129
133
 
134
+ _fd_term(&fds);
130
135
  return 0;
131
136
  }
132
137
 
@@ -135,16 +140,20 @@ static int __wait_writable(int fd, const struct timeval *timeout, int *isset) {
135
140
  struct timeval *toptr = NULL;
136
141
 
137
142
  _fdset_t fds;
143
+
144
+ /* Be cautious: a call to rb_fd_init to initialize the rb_fdset_t structure
145
+ * must be paired with a call to rb_fd_term to free it. */
138
146
  _fd_init(&fds);
139
147
  _fd_set(fd, &fds);
140
148
 
141
- /* rb_fd_select modifies the passed timeval, so we pass a copy */
149
+ /* rb_thread_{fd_,}select modifies the passed timeval, so we pass a copy */
142
150
  if (timeout != NULL) {
143
151
  memcpy(&to, timeout, sizeof(to));
144
152
  toptr = &to;
145
153
  }
146
154
 
147
155
  if (_thread_fd_select(fd + 1, NULL, &fds, NULL, toptr) < 0) {
156
+ _fd_term(&fds);
148
157
  return -1;
149
158
  }
150
159
 
@@ -152,6 +161,7 @@ static int __wait_writable(int fd, const struct timeval *timeout, int *isset) {
152
161
  *isset = 1;
153
162
  }
154
163
 
164
+ _fd_term(&fds);
155
165
  return 0;
156
166
  }
157
167
 
@@ -1,3 +1,3 @@
1
1
  module Hiredis
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiredis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pieter Noordhuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-27 00:00:00.000000000 Z
11
+ date: 2014-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake