gobject-introspection 4.1.2 → 4.1.3

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
  SHA256:
3
- metadata.gz: eff07e185f0759ccd823df31493a4b7f3012fe045f14eb1edac2315cd657ef23
4
- data.tar.gz: 67cb2d6f667aa0255ab581eaae1d4fb6d85a736c8c7544c6caccff271b6168f1
3
+ metadata.gz: 9d0bd60dfa601cccb6f4668d0e1703e23bbe7ab2af8ee682d1b7752923c41e35
4
+ data.tar.gz: 3b6ffbede0aacb2a37aaac5d7cbc014904ca731ccc5c4e1378328e2ab5bf86fa
5
5
  SHA512:
6
- metadata.gz: be4e95844ad869d782590a6a978947d429b704a054d06a63810d2e2ad4a3daf9e8511f25c1dff60f4d31197c69d84df36db6afe1aaeba3dbf81d9e9ecea7de7b
7
- data.tar.gz: 608d5dffeb78e04770b721982fcc83d78a5c8742d912f9800b09b6a4d03ad007485f7ea8b6d5e92f04cfb5520f8fedc9093ec52e606489c4e3e9d02cc6ff29bf
6
+ metadata.gz: 289fc71084bdb9d2d557cd7c599170880dbf4b22a1f23059fd0406330a38041478241d9fcd78e793290d7901a2482250d7c31e3bec261f83285a1e4b671f4210
7
+ data.tar.gz: c34cf025299b940a644a962d1dd8b04da8eb8c06482083b666599e490900adf0a26cb21e3a4701c1fcf9c70785ea8b5a9b6299488e2d49c9239416b96c6e3502
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2021 Ruby-GNOME Project Team
1
+ # Copyright (C) 2012-2023 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -82,14 +82,14 @@ module GObjectIntrospection
82
82
 
83
83
  def load_function_info(info)
84
84
  name = rubyish_method_name(info)
85
- define_singleton_method(@base_module, name, info)
85
+ define_singleton_method(info, @base_module, name)
86
86
  end
87
87
 
88
88
  def load_function_info_singleton_method(info, klass, method_name)
89
- define_singleton_method(klass, method_name, info)
89
+ define_singleton_method(info, klass, method_name)
90
90
  end
91
91
 
92
- def define_module_function(target_module, name, function_info)
92
+ def define_module_function(function_info, target_module, name)
93
93
  prepare_function_info_lock_gvl(function_info, target_module)
94
94
  full_method_name = "#{target_module}\#.#{name}"
95
95
  invoker = Invoker.new(function_info, name, full_method_name)
@@ -102,7 +102,7 @@ module GObjectIntrospection
102
102
  DEFINE_METHOD
103
103
  end
104
104
 
105
- def define_singleton_method(klass, name, info)
105
+ def define_singleton_method(info, klass, name)
106
106
  prepare_function_info_lock_gvl(info, klass)
107
107
  invoker = Invoker.new(info, name, "#{klass}.#{name}")
108
108
  singleton_class = klass.singleton_class
@@ -177,9 +177,12 @@ module GObjectIntrospection
177
177
  def define_enum(info)
178
178
  # TODO: Can we do the same things for flags on NONE GType?
179
179
  return if info.gtype == GLib::Type::NONE
180
- self.class.define_class(info.gtype,
181
- rubyish_class_name(info),
182
- @base_module)
180
+ klass = self.class.define_class(info.gtype,
181
+ rubyish_class_name(info),
182
+ @base_module)
183
+ prepare_class(klass) do
184
+ load_methods(info, klass)
185
+ end
183
186
  end
184
187
 
185
188
  def define_error(info)
@@ -222,7 +225,12 @@ module GObjectIntrospection
222
225
  end
223
226
  @base_module.const_set(rubyish_class_name(info), flags_module)
224
227
  else
225
- self.class.define_class(info.gtype, flags_class_name(info), @base_module)
228
+ klass = self.class.define_class(info.gtype,
229
+ flags_class_name(info),
230
+ @base_module)
231
+ prepare_class(klass) do
232
+ load_methods(info, klass)
233
+ end
226
234
  end
227
235
  end
228
236
 
@@ -479,7 +487,11 @@ module GObjectIntrospection
479
487
  name
480
488
  end
481
489
  when "to_string"
482
- "to_s"
490
+ if n_in_args.zero?
491
+ "to_s"
492
+ else
493
+ name
494
+ end
483
495
  when "to_integer"
484
496
  "to_i"
485
497
  when "foreach"
@@ -756,9 +768,9 @@ module GObjectIntrospection
756
768
  end
757
769
 
758
770
  n_missing_arguments = @n_in_args - arguments.size
759
- if 0 < n_missing_arguments
760
- @in_arg_nil_indexes.each_with_index do |nil_index, i|
761
- next if i <= n_missing_arguments
771
+ n_in_arg_nil_indexes = @in_arg_nil_indexes.size
772
+ if 0 < n_missing_arguments and n_missing_arguments < n_in_arg_nil_indexes
773
+ @in_arg_nil_indexes[-n_missing_arguments..-1].each do |nil_index|
762
774
  arguments.insert(nil_index, nil)
763
775
  end
764
776
  end
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: 4.1.2
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-04-28 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: 4.1.2
19
+ version: 4.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: 4.1.2
26
+ version: 4.1.3
27
27
  description: Ruby/GObjectIntrospection provides bindings of GObject Introspection
28
28
  and a loader module that can generate dynamically Ruby bindings of any GObject C
29
29
  libraries