ffi-mysql 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.hgtags CHANGED
@@ -5,3 +5,4 @@ a8bbc2c818cd66f86fbeb43f59bdb21499d58768 v1.0.0
5
5
  9f6397d60c7bf3361ddd23a6aa4ee728879a2d21 v1.1.1
6
6
  d30df88c1128073dba7b9ce8953b7699e5b86436 v1.1.2
7
7
  57d24846ffe8435fe42d5bf2f8db3eedbc99d8fb v1.1.3
8
+ 0d67225c9ea8d8a59d531b0719656959f06597cc v1.1.4
data/History.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ 1.1.4 / 2012-05-10
2
+ ------------------
3
+
4
+ * Add test for nil? whenever testing for null-pointers from ffi
5
+
1
6
  1.1.3 / 2012-04-05
2
7
  ------------------
3
8
 
@@ -0,0 +1,272 @@
1
+ !RBIX
2
+ 8379422121928200206
3
+ 18
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 29
13
+ 99
14
+ 7
15
+ 0
16
+ 1
17
+ 65
18
+ 49
19
+ 1
20
+ 3
21
+ 13
22
+ 99
23
+ 12
24
+ 7
25
+ 2
26
+ 12
27
+ 7
28
+ 3
29
+ 12
30
+ 65
31
+ 12
32
+ 49
33
+ 4
34
+ 4
35
+ 15
36
+ 49
37
+ 2
38
+ 0
39
+ 15
40
+ 2
41
+ 11
42
+ I
43
+ 6
44
+ I
45
+ 0
46
+ I
47
+ 0
48
+ I
49
+ 0
50
+ I
51
+ 0
52
+ n
53
+ p
54
+ 5
55
+ x
56
+ 5
57
+ Mysql
58
+ x
59
+ 10
60
+ open_class
61
+ x
62
+ 14
63
+ __class_init__
64
+ M
65
+ 1
66
+ n
67
+ n
68
+ x
69
+ 5
70
+ Mysql
71
+ i
72
+ 62
73
+ 5
74
+ 66
75
+ 65
76
+ 7
77
+ 0
78
+ 79
79
+ 49
80
+ 1
81
+ 2
82
+ 15
83
+ 65
84
+ 7
85
+ 2
86
+ 79
87
+ 49
88
+ 1
89
+ 2
90
+ 15
91
+ 65
92
+ 7
93
+ 3
94
+ 4
95
+ 4
96
+ 49
97
+ 1
98
+ 2
99
+ 15
100
+ 65
101
+ 7
102
+ 4
103
+ 45
104
+ 0
105
+ 5
106
+ 45
107
+ 2
108
+ 6
109
+ 45
110
+ 3
111
+ 7
112
+ 35
113
+ 3
114
+ 7
115
+ 8
116
+ 64
117
+ 49
118
+ 9
119
+ 1
120
+ 49
121
+ 1
122
+ 2
123
+ 15
124
+ 99
125
+ 7
126
+ 10
127
+ 7
128
+ 11
129
+ 65
130
+ 5
131
+ 49
132
+ 12
133
+ 4
134
+ 11
135
+ I
136
+ 5
137
+ I
138
+ 0
139
+ I
140
+ 0
141
+ I
142
+ 0
143
+ I
144
+ 0
145
+ n
146
+ p
147
+ 13
148
+ x
149
+ 5
150
+ MAJOR
151
+ x
152
+ 9
153
+ const_set
154
+ x
155
+ 5
156
+ MINOR
157
+ x
158
+ 4
159
+ TINY
160
+ x
161
+ 7
162
+ VERSION
163
+ n
164
+ n
165
+ n
166
+ s
167
+ E
168
+ 0
169
+
170
+ 1
171
+ .
172
+ x
173
+ 4
174
+ join
175
+ x
176
+ 7
177
+ version
178
+ M
179
+ 1
180
+ n
181
+ n
182
+ x
183
+ 7
184
+ version
185
+ i
186
+ 4
187
+ 45
188
+ 0
189
+ 1
190
+ 11
191
+ I
192
+ 1
193
+ I
194
+ 0
195
+ I
196
+ 0
197
+ I
198
+ 0
199
+ I
200
+ 0
201
+ n
202
+ p
203
+ 2
204
+ x
205
+ 7
206
+ VERSION
207
+ n
208
+ p
209
+ 5
210
+ I
211
+ -1
212
+ I
213
+ e
214
+ I
215
+ 0
216
+ I
217
+ f
218
+ I
219
+ 4
220
+ x
221
+ 60
222
+ /LOCAL/fifr/projekte/ruby/ffi-mysql/lib/ffi-mysql/version.rb
223
+ p
224
+ 0
225
+ x
226
+ 13
227
+ attach_method
228
+ p
229
+ 11
230
+ I
231
+ 2
232
+ I
233
+ 3
234
+ I
235
+ a
236
+ I
237
+ 5
238
+ I
239
+ 12
240
+ I
241
+ 7
242
+ I
243
+ 1b
244
+ I
245
+ a
246
+ I
247
+ 33
248
+ I
249
+ e
250
+ I
251
+ 3e
252
+ x
253
+ 60
254
+ /LOCAL/fifr/projekte/ruby/ffi-mysql/lib/ffi-mysql/version.rb
255
+ p
256
+ 0
257
+ x
258
+ 13
259
+ attach_method
260
+ p
261
+ 3
262
+ I
263
+ 0
264
+ I
265
+ 1
266
+ I
267
+ 1d
268
+ x
269
+ 60
270
+ /LOCAL/fifr/projekte/ruby/ffi-mysql/lib/ffi-mysql/version.rb
271
+ p
272
+ 0
@@ -282,7 +282,8 @@ class Mysql
282
282
 
283
283
  ObjectSpace.define_finalizer( self, Mysql.finalizer(@mysql, @mysql_free))
284
284
 
285
- if C::mysql_real_connect( @mysql, host, user, passwd, db, port, sock, flag ).null?
285
+ ret = C::mysql_real_connect( @mysql, host, user, passwd, db, port, sock, flag )
286
+ if ret.nil? or ret.null?
286
287
  raise Mysql::Error, error
287
288
  end
288
289
 
@@ -530,7 +531,7 @@ class Mysql
530
531
  # @param [String,nil] wild The pattern the databases must match
531
532
  def list_dbs(wild = nil)
532
533
  res = C::mysql_list_dbs(@mysql, wild)
533
- if res.null?
534
+ if res.nil? or res.null?
534
535
  raise Error.new(error, errno)
535
536
  end
536
537
  res = Result.new(@mysql, res)
@@ -547,7 +548,7 @@ class Mysql
547
548
  # @return [Result] A MySQL result of the field names
548
549
  def list_fields(table, wild = nil)
549
550
  res = C::mysql_list_fields(@mysql, table, wild)
550
- if res.null?
551
+ if res.nil? or res.null?
551
552
  raise Error.new(error, errno)
552
553
  end
553
554
  Result.new(@mysql, res)
@@ -557,7 +558,7 @@ class Mysql
557
558
  # @return [Result] A MySQL result of the current server threads
558
559
  def list_processes
559
560
  res = C::mysql_list_processes(@mysql)
560
- if res.null?
561
+ if res.nil? or res.null?
561
562
  raise Error.new(error, errno)
562
563
  end
563
564
  Result.new(@mysql, res)
@@ -568,7 +569,7 @@ class Mysql
568
569
  # @return [Array<String>] The table names
569
570
  def list_tables(wild = nil)
570
571
  res = C::mysql_list_tables(@mysql, wild)
571
- if res.null?
572
+ if res.nil? or res.null?
572
573
  raise Error.new(error, errno)
573
574
  end
574
575
  res = Result.new(@mysql, res)
@@ -639,7 +640,7 @@ class Mysql
639
640
  # @return [Result] the result set
640
641
  def store_result
641
642
  res = C::mysql_store_result(@mysql)
642
- if res.null?
643
+ if res.nil? or res.null?
643
644
  raise Error.new(error, errno)
644
645
  end
645
646
  Result.new(@mysql, res)
@@ -649,7 +650,7 @@ class Mysql
649
650
  # @return [Result] the result set
650
651
  def use_result
651
652
  res = C::mysql_use_result(@mysql)
652
- if res.null?
653
+ if res.nil? or res.null?
653
654
  raise Error.new(error, errno)
654
655
  end
655
656
  Result.new(@mysql, res)
@@ -38,7 +38,7 @@ class Mysql
38
38
  def fetch_lengths
39
39
  raise Error, "Result has been freed" unless @result
40
40
  lengths = C::mysql_fetch_lengths(@result)
41
- lengths.null? ? nil : lengths.read_array_of_long(num_fields)
41
+ (lengths.nil? or lengths.null?) ? nil : lengths.read_array_of_long(num_fields)
42
42
  end
43
43
 
44
44
  # @return [Array<String>] Ary of elements of the next row.
@@ -125,7 +125,7 @@ class Mysql
125
125
  def fetch_field
126
126
  raise Error, "Result has been freed" unless @result
127
127
  field_ptr = C::mysql_fetch_field(@result)
128
- if field_ptr.null?
128
+ if field_ptr.nil? or field_ptr.null?
129
129
  nil
130
130
  else
131
131
  Field.new(C::Field.new(field_ptr))
@@ -170,7 +170,7 @@ class Mysql
170
170
  @mysql = mysql
171
171
  @stmt = C::mysql_stmt_init(mysql)
172
172
  @params = []
173
- raise Error, error_msg if @stmt.null?
173
+ raise Error, error_msg if @stmt.nil? or @stmt.null?
174
174
  ObjectSpace.define_finalizer( self, Stmt.finalizer(@stmt) )
175
175
 
176
176
  _true = FFI::MemoryPointer.new(:int)
@@ -365,7 +365,7 @@ class Mysql
365
365
  def result_metadata
366
366
  raise Error, "Statment already closed" unless @stmt
367
367
  result = C::mysql_stmt_result_metadata(@stmt)
368
- if result.null?
368
+ if result.nil? or result.null?
369
369
  if C::mysql_stmt_errno(@stmt) != 0
370
370
  raise Error, error_msg
371
371
  end
@@ -4,7 +4,7 @@ class Mysql
4
4
  # Minor version
5
5
  MINOR = 1
6
6
  # Tiny version
7
- TINY = 3
7
+ TINY = 4
8
8
 
9
9
  # Version string
10
10
  VERSION = [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-05 00:00:00.000000000 Z
12
+ date: 2012-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -47,7 +47,10 @@ description: Pure Ruby FFI interface to MySQL.
47
47
  email: frank.fischer@mathematik.tu-chemnitz.de
48
48
  executables: []
49
49
  extensions: []
50
- extra_rdoc_files: []
50
+ extra_rdoc_files:
51
+ - !binary |-
52
+ bGliL2ZmaS1teXNxbC8ucmJ4LzI3LzI3MjdhOTE5Njg1ZjQ5MzgxNzdkYjli
53
+ MDMxMDc1YTQ0ZDIxNjBkODQ=
51
54
  files:
52
55
  - !binary |-
53
56
  LmhnaWdub3Jl
@@ -61,6 +64,9 @@ files:
61
64
  UmFrZWZpbGU=
62
65
  - !binary |-
63
66
  bGliL2ZmaS1teXNxbC5yYg==
67
+ - !binary |-
68
+ bGliL2ZmaS1teXNxbC8ucmJ4LzI3LzI3MjdhOTE5Njg1ZjQ5MzgxNzdkYjli
69
+ MDMxMDc1YTQ0ZDIxNjBkODQ=
64
70
  - !binary |-
65
71
  bGliL2ZmaS1teXNxbC9jb25zdGFudHMucmI=
66
72
  - !binary |-