gobject-introspection 4.2.0 → 4.2.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 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 438bd5d1deff7d98a34a3556c97298f3a233cf95c37c070783fc64d6ec97481d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1cbf74a846a7d3ac67b0ae6ee4efb3c22bc1bed684c480f647484753ebe1b2de
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ad59016f3ca59c6d954fc05705b3495bdc833e7bd237ebd923b367dff967d20f74baeeffc9a655650681667e5a80e47c18b9843a77b813857704fb95d6682b7a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a4565fc5ecc0c62be547eb0e26c0e7115ec1f68a331b17d3557556610586a0a430512b99aeb45b266f3429cef740e442d53a548500dad3822b2f8d98364a824d
         
     | 
| 
         @@ -1047,11 +1047,15 @@ rb_gi_arguments_convert_arg_array_body_c_sized(ArrayLikeToRubyData *data, 
     | 
|
| 
       1047 
1047 
     | 
    
         
             
                        return rb_arg;
         
     | 
| 
       1048 
1048 
     | 
    
         
             
                    }
         
     | 
| 
       1049 
1049 
     | 
    
         
             
                  case GI_TYPE_TAG_GTYPE:
         
     | 
| 
       1050 
     | 
    
         
            -
                     
     | 
| 
       1051 
     | 
    
         
            -
             
     | 
| 
       1052 
     | 
    
         
            -
             
     | 
| 
       1053 
     | 
    
         
            -
             
     | 
| 
       1054 
     | 
    
         
            -
             
     | 
| 
      
 1050 
     | 
    
         
            +
                    {
         
     | 
| 
      
 1051 
     | 
    
         
            +
                        const GType *types = (const GType *)elements;
         
     | 
| 
      
 1052 
     | 
    
         
            +
                        VALUE rb_arg = rb_ary_new_capa(length);
         
     | 
| 
      
 1053 
     | 
    
         
            +
                        gint64 i;
         
     | 
| 
      
 1054 
     | 
    
         
            +
                        for (i = 0; i < length; i++) {
         
     | 
| 
      
 1055 
     | 
    
         
            +
                            rb_ary_push(rb_arg, rbgobj_gtype_new(types[i]));
         
     | 
| 
      
 1056 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1057 
     | 
    
         
            +
                        return rb_arg;
         
     | 
| 
      
 1058 
     | 
    
         
            +
                    }
         
     | 
| 
       1055 
1059 
     | 
    
         
             
                  case GI_TYPE_TAG_UTF8:
         
     | 
| 
       1056 
1060 
     | 
    
         
             
                    {
         
     | 
| 
       1057 
1061 
     | 
    
         
             
                        const gchar **strings = (const gchar **)elements;
         
     | 
| 
         @@ -167,10 +167,10 @@ rb_gi_struct_info_to_ruby(GIStructInfo *info, 
     | 
|
| 
       167 
167 
     | 
    
         
             
            gpointer
         
     | 
| 
       168 
168 
     | 
    
         
             
            rb_gi_struct_info_from_ruby(GIStructInfo *info, VALUE rb_object)
         
     | 
| 
       169 
169 
     | 
    
         
             
            {
         
     | 
| 
       170 
     | 
    
         
            -
                GIRegisteredTypeInfo * 
     | 
| 
      
 170 
     | 
    
         
            +
                GIRegisteredTypeInfo *registered_type_info = (GIRegisteredTypeInfo *)info;
         
     | 
| 
       171 
171 
     | 
    
         
             
                GType gtype;
         
     | 
| 
       172 
172 
     | 
    
         | 
| 
       173 
     | 
    
         
            -
                gtype = g_registered_type_info_get_g_type( 
     | 
| 
      
 173 
     | 
    
         
            +
                gtype = g_registered_type_info_get_g_type(registered_type_info);
         
     | 
| 
       174 
174 
     | 
    
         
             
                return rb_gi_struct_get_raw(rb_object, gtype);
         
     | 
| 
       175 
175 
     | 
    
         
             
            }
         
     | 
| 
       176 
176 
     | 
    
         | 
| 
         @@ -103,6 +103,12 @@ module GObjectIntrospection 
     | 
|
| 
       103 
103 
     | 
    
         
             
                end
         
     | 
| 
       104 
104 
     | 
    
         | 
| 
       105 
105 
     | 
    
         
             
                def define_singleton_method(info, klass, name)
         
     | 
| 
      
 106 
     | 
    
         
            +
                  case name
         
     | 
| 
      
 107 
     | 
    
         
            +
                  when "hash"
         
     | 
| 
      
 108 
     | 
    
         
            +
                    # Ignore methods that require 1+ arguments and use well-known
         
     | 
| 
      
 109 
     | 
    
         
            +
                    # name. It may break something.
         
     | 
| 
      
 110 
     | 
    
         
            +
                    return unless info.n_required_in_args.zero?
         
     | 
| 
      
 111 
     | 
    
         
            +
                  end
         
     | 
| 
       106 
112 
     | 
    
         
             
                  prepare_function_info_lock_gvl(info, klass)
         
     | 
| 
       107 
113 
     | 
    
         
             
                  invoker = Invoker.new(info, name, "#{klass}.#{name}")
         
     | 
| 
       108 
114 
     | 
    
         
             
                  singleton_class = klass.singleton_class
         
     | 
| 
         @@ -241,6 +247,8 @@ module GObjectIntrospection 
     | 
|
| 
       241 
247 
     | 
    
         | 
| 
       242 
248 
     | 
    
         
             
                def load_object_info(info)
         
     | 
| 
       243 
249 
     | 
    
         
             
                  return if info.gtype == GLib::Type::NONE
         
     | 
| 
      
 250 
     | 
    
         
            +
                  # e.g.: GstBitmask
         
     | 
| 
      
 251 
     | 
    
         
            +
                  return if info.fundamental? and !info.gtype.instantiatable?
         
     | 
| 
       244 
252 
     | 
    
         
             
                  klass = self.class.define_class(info.gtype,
         
     | 
| 
       245 
253 
     | 
    
         
             
                                                  rubyish_class_name(info),
         
     | 
| 
       246 
254 
     | 
    
         
             
                                                  @base_module)
         
     | 
| 
         @@ -534,7 +542,7 @@ module GObjectIntrospection 
     | 
|
| 
       534 
542 
     | 
    
         
             
                end
         
     | 
| 
       535 
543 
     | 
    
         | 
| 
       536 
544 
     | 
    
         
             
                def prepare_function_info_lock_gvl(function_info, target_module)
         
     | 
| 
       537 
     | 
    
         
            -
                  # For backward  
     | 
| 
      
 545 
     | 
    
         
            +
                  # For backward compatibility
         
     | 
| 
       538 
546 
     | 
    
         
             
                  if respond_to?(:should_unlock_gvl?)
         
     | 
| 
       539 
547 
     | 
    
         
             
                    function_info.lock_gvl_default =
         
     | 
| 
       540 
548 
     | 
    
         
             
                      !should_unlock_gvl?(function_info, target_module)
         
     | 
    
        data/test/test-loader.rb
    CHANGED
    
    | 
         @@ -60,16 +60,16 @@ class TestLoaderInfo < Test::Unit::TestCase 
     | 
|
| 
       60 
60 
     | 
    
         | 
| 
       61 
61 
     | 
    
         
             
                    include Gio::Converter
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
       63 
     | 
    
         
            -
                    attr_reader : 
     | 
| 
      
 63 
     | 
    
         
            +
                    attr_reader :was_reset
         
     | 
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
                    def virtual_do_reset
         
     | 
| 
       66 
     | 
    
         
            -
                      @ 
     | 
| 
      
 66 
     | 
    
         
            +
                      @was_reset = true
         
     | 
| 
       67 
67 
     | 
    
         
             
                    end
         
     | 
| 
       68 
68 
     | 
    
         
             
                  end
         
     | 
| 
       69 
69 
     | 
    
         
             
                  resettable_converter = resettable_converter_class.new
         
     | 
| 
       70 
70 
     | 
    
         
             
                  resettable_converter.reset
         
     | 
| 
       71 
71 
     | 
    
         
             
                  assert do
         
     | 
| 
       72 
     | 
    
         
            -
                    resettable_converter. 
     | 
| 
      
 72 
     | 
    
         
            +
                    resettable_converter.was_reset
         
     | 
| 
       73 
73 
     | 
    
         
             
                  end
         
     | 
| 
       74 
74 
     | 
    
         
             
                end
         
     | 
| 
       75 
75 
     | 
    
         | 
    
        data/test/test-repository.rb
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright (C) 2012- 
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright (C) 2012-2024  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
         
     | 
| 
         @@ -47,14 +47,17 @@ class TestRepository < Test::Unit::TestCase 
     | 
|
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
              def test_loaded_namespaces
         
     | 
| 
       49 
49 
     | 
    
         
             
                assert_equal(["GLib", "GObject", "Gio"].sort,
         
     | 
| 
       50 
     | 
    
         
            -
                              
     | 
| 
      
 50 
     | 
    
         
            +
                             # Gio 2.79.0 or later depend on GModule too
         
     | 
| 
      
 51 
     | 
    
         
            +
                             @repository.loaded_namespaces.sort - ["GModule"])
         
     | 
| 
       51 
52 
     | 
    
         
             
              end
         
     | 
| 
       52 
53 
     | 
    
         | 
| 
       53 
54 
     | 
    
         
             
              def test_enumerable
         
     | 
| 
       54 
55 
     | 
    
         
             
                namespaces = @repository.collect do |info|
         
     | 
| 
       55 
56 
     | 
    
         
             
                  info.namespace
         
     | 
| 
       56 
57 
     | 
    
         
             
                end
         
     | 
| 
       57 
     | 
    
         
            -
                assert_equal(["GLib", "GObject", "Gio"].sort, 
     | 
| 
      
 58 
     | 
    
         
            +
                assert_equal(["GLib", "GObject", "Gio"].sort,
         
     | 
| 
      
 59 
     | 
    
         
            +
                             # Gio 2.79.0 or later depend on GModule too
         
     | 
| 
      
 60 
     | 
    
         
            +
                             namespaces.uniq.sort - ["GModule"])
         
     | 
| 
       58 
61 
     | 
    
         
             
              end
         
     | 
| 
       59 
62 
     | 
    
         | 
| 
       60 
63 
     | 
    
         
             
              def test_find_by_gtype
         
     | 
    
        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.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.2.1
         
     | 
| 
       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:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-02-22 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.2. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 4.2.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: 4.2. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 4.2.1
         
     | 
| 
       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
         
     | 
| 
         @@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       150 
150 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       151 
151 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       152 
152 
     | 
    
         
             
            requirements: []
         
     | 
| 
       153 
     | 
    
         
            -
            rubygems_version: 3.5. 
     | 
| 
      
 153 
     | 
    
         
            +
            rubygems_version: 3.5.1
         
     | 
| 
       154 
154 
     | 
    
         
             
            signing_key:
         
     | 
| 
       155 
155 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       156 
156 
     | 
    
         
             
            summary: Ruby/GObjectIntrospection is a Ruby binding of GObject Introspection.
         
     |