gobject-introspection 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gobject-introspection/loader.rb +25 -16
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e43e406158831356a52030b7b5b3d61f07a5a339
|
4
|
+
data.tar.gz: 0a8d7c7ca0a229194e91679b9d6791d880770b96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23fc5c13be330165b562cc4e16bd0ba78eb9cde9013aa1dbf970cc27cad7f08dfaca733c87fe066ded2ee2e3640de8ddd8a1f5ec9ae4dd648058520bffc2a16c
|
7
|
+
data.tar.gz: 87857b500dcb50c80e69497315e2273715da89338dfcccdc6954d1de6f3320ada8518e90364ee242d509d2fae25858ee6cc9b393974fce95bcda7f662681b3bb
|
@@ -241,33 +241,42 @@ module GObjectIntrospection
|
|
241
241
|
|
242
242
|
readable = options[:readable]
|
243
243
|
readable = flags.readable? if readable.nil?
|
244
|
-
need_number_to_bool_convert = false
|
245
|
-
if name.start_with?("is_") and
|
246
|
-
field_info.type.tag == TypeTag::UINT32
|
247
|
-
need_number_to_bool_convert = true
|
248
|
-
end
|
249
244
|
if readable
|
250
245
|
reader_method_name = rubyish_field_reader_name(field_info, name)
|
251
|
-
|
252
|
-
klass.__send__(:define_method, reader_method_name) do ||
|
253
|
-
value = info.get_field_value(self, i)
|
254
|
-
if need_number_to_bool_convert
|
255
|
-
value != 0
|
256
|
-
else
|
257
|
-
value
|
258
|
-
end
|
259
|
-
end
|
246
|
+
load_field_reader(info, i, field_info, klass, name, reader_method_name)
|
260
247
|
end
|
261
248
|
|
262
249
|
writable = options[:writable]
|
263
250
|
writable = flags.writable? if writable.nil?
|
264
251
|
if writable
|
265
|
-
|
266
|
-
|
252
|
+
load_field_writer(info, i, field_info, klass, name, "#{name}=")
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
def load_field_reader(info, i, field_info, klass, name, method_name)
|
257
|
+
remove_existing_method(klass, method_name)
|
258
|
+
|
259
|
+
need_number_to_bool_convert = false
|
260
|
+
if name.start_with?("is_") and
|
261
|
+
field_info.type.tag == TypeTag::UINT32
|
262
|
+
need_number_to_bool_convert = true
|
263
|
+
end
|
264
|
+
klass.__send__(:define_method, method_name) do ||
|
265
|
+
value = info.get_field_value(self, i)
|
266
|
+
if need_number_to_bool_convert
|
267
|
+
value != 0
|
268
|
+
else
|
269
|
+
value
|
267
270
|
end
|
268
271
|
end
|
269
272
|
end
|
270
273
|
|
274
|
+
def load_field_writer(info, i, field_info, klass, name, method_name)
|
275
|
+
klass.__send__(:define_method, method_name) do |value|
|
276
|
+
info.set_field_value(self, i, value)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
271
280
|
def load_methods(info, klass)
|
272
281
|
grouped_methods = info.methods.group_by do |method_info|
|
273
282
|
method_info.class
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gobject-introspection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glib2
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.1.
|
19
|
+
version: 3.1.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.1.
|
26
|
+
version: 3.1.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: test-unit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|