gobject-introspection 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ea59f2198f3d8205e9cb2b841a2d46e5b740c43
4
- data.tar.gz: d47e0988e95066f8b437f929be7dd436fb7ca7ad
3
+ metadata.gz: 5e7de825796aca9c7935a109c3e048b84432e163
4
+ data.tar.gz: b22702a31833ad07b46dd190895c955b95fdcaac
5
5
  SHA512:
6
- metadata.gz: 1b394a4d695ab3a752a43df3b088ea32798f49cb33c72ba96465c2ccf7e11de2ab84cfbf22f39ea404eec406e4372ed5f4e458f60013286ca2a7a9506f83af45
7
- data.tar.gz: a808106e4e8782e6ddb715b9adfe7cfc4b4f6f984352be5af94aef6a315fa8639d2993c917561a2ffb21142598dc1694ff88e7280f5777b9f6340e04cd37630e
6
+ metadata.gz: 78016bee5bbd67ea91f822eda8a13f888edc9393a11dca852b07a1df4dc8002a8a865473fdfed55b61583030817bcdab69d03a43acffcb75e9f6f76cf97ffbab
7
+ data.tar.gz: 677113a40e5ad47a968061441b6fc066f365277286dccde7aa9c9b464ab9194d05ca83fce507fb82709f1fb5ca663ab7ed4350361dadc20fca0c2b99a0667354
@@ -1207,7 +1207,14 @@ rb_gi_out_argument_init_array_c(GIArgument *argument,
1207
1207
  case GI_TYPE_TAG_VOID:
1208
1208
  case GI_TYPE_TAG_BOOLEAN:
1209
1209
  case GI_TYPE_TAG_INT8:
1210
+ g_base_info_unref(element_type_info);
1211
+ rb_raise(rb_eNotImpError,
1212
+ "TODO: allocates GIArgument(array)[c][%s] for output",
1213
+ g_type_tag_to_string(element_type_tag));
1214
+ break;
1210
1215
  case GI_TYPE_TAG_UINT8:
1216
+ argument->v_pointer = xmalloc(sizeof(guint8 *));
1217
+ break;
1211
1218
  case GI_TYPE_TAG_INT16:
1212
1219
  case GI_TYPE_TAG_UINT16:
1213
1220
  case GI_TYPE_TAG_INT32:
@@ -1757,7 +1764,14 @@ rb_gi_out_argument_fin_array_c(GIArgument *argument,
1757
1764
  case GI_TYPE_TAG_VOID:
1758
1765
  case GI_TYPE_TAG_BOOLEAN:
1759
1766
  case GI_TYPE_TAG_INT8:
1767
+ g_base_info_unref(element_type_info);
1768
+ rb_raise(rb_eNotImpError,
1769
+ "TODO: free out GIArgument(array)[c][%s]",
1770
+ g_type_tag_to_string(element_type_tag));
1771
+ break;
1760
1772
  case GI_TYPE_TAG_UINT8:
1773
+ xfree(argument->v_pointer);
1774
+ break;
1761
1775
  case GI_TYPE_TAG_INT16:
1762
1776
  case GI_TYPE_TAG_UINT16:
1763
1777
  case GI_TYPE_TAG_INT32:
@@ -36,21 +36,45 @@ gi_constructor_info_get_type(void)
36
36
  }
37
37
 
38
38
  static void
39
- initialize_receiver(VALUE receiver, GITypeInfo *info, GIArgument *value)
39
+ initialize_receiver(VALUE receiver,
40
+ GICallableInfo *callable_info,
41
+ GIArgument *value)
40
42
  {
43
+ GITypeInfo return_value_info;
41
44
  GIBaseInfo *interface_info;
42
45
  GIInfoType interface_type;
43
46
 
44
- if (g_type_info_get_tag(info) != GI_TYPE_TAG_INTERFACE) {
47
+ g_callable_info_load_return_type(callable_info, &return_value_info);
48
+
49
+ if (g_type_info_get_tag(&return_value_info) != GI_TYPE_TAG_INTERFACE) {
45
50
  rb_raise(rb_eRuntimeError, "TODO: returned value isn't interface");
46
51
  }
47
52
 
48
- interface_info = g_type_info_get_interface(info);
53
+ interface_info = g_type_info_get_interface(&return_value_info);
49
54
  interface_type = g_base_info_get_type(interface_info);
50
55
  g_base_info_unref(interface_info);
51
56
  switch (interface_type) {
52
57
  case GI_INFO_TYPE_OBJECT:
53
58
  G_INITIALIZE(receiver, value->v_pointer);
59
+ {
60
+ gboolean was_floating;
61
+ was_floating = g_object_is_floating(value->v_pointer);
62
+ g_object_ref_sink(value->v_pointer);
63
+ switch (g_callable_info_get_caller_owns(callable_info)) {
64
+ case GI_TRANSFER_NOTHING:
65
+ break;
66
+ case GI_TRANSFER_CONTAINER:
67
+ break;
68
+ case GI_TRANSFER_EVERYTHING:
69
+ if (!was_floating) {
70
+ g_object_unref(value->v_pointer);
71
+ }
72
+ break;
73
+ default:
74
+ g_assert_not_reached();
75
+ break;
76
+ }
77
+ }
54
78
  break;
55
79
  case GI_INFO_TYPE_STRUCT:
56
80
  G_INITIALIZE(receiver, value->v_pointer);
@@ -91,7 +115,6 @@ rg_invoke(VALUE self, VALUE rb_receiver, VALUE rb_arguments)
91
115
  GIFunctionInfo *info;
92
116
  GICallableInfo *callable_info;
93
117
  GIArgument return_value;
94
- GITypeInfo return_value_info;
95
118
 
96
119
  info = SELF(self);
97
120
  callable_info = (GICallableInfo *)info;
@@ -107,8 +130,7 @@ rg_invoke(VALUE self, VALUE rb_receiver, VALUE rb_arguments)
107
130
  &return_value,
108
131
  NULL);
109
132
 
110
- g_callable_info_load_return_type(callable_info, &return_value_info);
111
- initialize_receiver(rb_receiver, &return_value_info, &return_value);
133
+ initialize_receiver(rb_receiver, callable_info, &return_value);
112
134
 
113
135
  return rb_receiver;
114
136
  }
@@ -37,7 +37,10 @@ module GObjectIntrospection
37
37
  repository.require(namespace, @version)
38
38
  pre_load(repository, namespace)
39
39
  repository.each(namespace) do |info|
40
- load_info(info)
40
+ load_info(info) if info.is_a?(InterfaceInfo)
41
+ end
42
+ repository.each(namespace) do |info|
43
+ load_info(info) unless info.is_a?(InterfaceInfo)
41
44
  end
42
45
  post_load(repository, namespace)
43
46
  end
@@ -270,6 +273,10 @@ module GObjectIntrospection
270
273
  raise "TODO: #{method_info_class}"
271
274
  end
272
275
  end
276
+ if klass.method_defined?(:each) and
277
+ klass.instance_method(:each).owner == klass
278
+ klass.include(Enumerable)
279
+ end
273
280
  end
274
281
 
275
282
  def load_constructor_infos(infos, klass)
@@ -302,8 +309,6 @@ module GObjectIntrospection
302
309
  end
303
310
 
304
311
  def initialize_post(object)
305
- return unless object.is_a?(GLib::Object)
306
- self.class.reference_gobject(object, :sink => true)
307
312
  end
308
313
 
309
314
  def find_suitable_callable_info(infos, arguments)
@@ -413,6 +418,12 @@ module GObjectIntrospection
413
418
  case return_type_tag
414
419
  when TypeTag::BOOLEAN
415
420
  case name
421
+ when "equal"
422
+ if function_info.n_in_args == 1
423
+ "=="
424
+ else
425
+ name
426
+ end
416
427
  when /\A(?:is|get_is|can_be)_/
417
428
  "#{$POSTMATCH}?"
418
429
  when /\Aget_/
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.0
4
+ version: 3.1.1
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: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2017-01-26 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.0
19
+ version: 3.1.1
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.0
26
+ version: 3.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: test-unit
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.5.1
147
+ rubygems_version: 2.5.2
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Ruby/GObjectIntrospection is a Ruby binding of GObjectIntrospection.