gobject-introspection 4.2.2 → 4.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/gobject-introspection/rb-gi-arguments.c +20 -4
- data/gobject-introspection.gemspec +1 -1
- data/lib/gobject-introspection/loader.rb +5 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cf24cfa2841cadc909b15cf038099549ac990a1e7ec567ed1903abd90e5ba4b
|
4
|
+
data.tar.gz: 5cff75547d5c09ed7e0cbe0aa03caa534f2b4f13fae1dd26e4487b9a372db2cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ea2df61fff3c0050b2d58c9da5a1f999ef80e3eb942902790770a077db0e433d64cf2d799755b7ada84ca943f784cef1aca9296f1807e4e685d97b9a04b9fd6
|
7
|
+
data.tar.gz: f8bfd35d6fdbdab28acffb5e8b80e6798c9cadda7fc6be664aa7da550e94514021235a94e3636db4bffc50180b8dec40c40b5e51aee1223b491e74cda53a20c0
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Ruby/GObjectIntrospection is a Ruby binding of GObject Introspect.
|
|
5
5
|
## Requirements
|
6
6
|
|
7
7
|
* Ruby/GLib2 in
|
8
|
-
[Ruby-GNOME2](https://ruby-
|
8
|
+
[Ruby-GNOME2](https://ruby-gnome.github.io/)
|
9
9
|
* [GObject Introspection](http://live.gnome.org/GObjectIntrospection)
|
10
10
|
|
11
11
|
## Install
|
@@ -21,4 +21,4 @@ under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
|
21
21
|
|
22
22
|
## Project Website
|
23
23
|
|
24
|
-
https://ruby-
|
24
|
+
https://ruby-gnome.github.io/
|
@@ -1764,6 +1764,10 @@ rb_gi_arguments_convert_arg_ghash(RBGIArguments *args,
|
|
1764
1764
|
GIArgument *arg,
|
1765
1765
|
RBGIArgMetadata *arg_metadata)
|
1766
1766
|
{
|
1767
|
+
if (arg_metadata->may_be_null_p && !arg->v_pointer) {
|
1768
|
+
return Qnil;
|
1769
|
+
}
|
1770
|
+
|
1767
1771
|
GHashToRubyData data;
|
1768
1772
|
|
1769
1773
|
data.args = args;
|
@@ -2858,12 +2862,21 @@ rb_gi_arguments_fill_raw_result(RBGIArguments *args,
|
|
2858
2862
|
gpointer raw_result,
|
2859
2863
|
GITypeInfo *type_info,
|
2860
2864
|
GITransfer transfer,
|
2865
|
+
gboolean may_return_null,
|
2861
2866
|
gboolean is_return_value)
|
2862
2867
|
{
|
2863
2868
|
GIFFIReturnValue *ffi_return_value = raw_result;
|
2864
|
-
GITypeTag type_tag;
|
2865
2869
|
|
2866
|
-
|
2870
|
+
if (may_return_null && RB_NIL_P(rb_result)) {
|
2871
|
+
if (is_return_value) {
|
2872
|
+
ffi_return_value->v_pointer = NULL;
|
2873
|
+
} else {
|
2874
|
+
*((gpointer *)raw_result) = NULL;
|
2875
|
+
}
|
2876
|
+
return;
|
2877
|
+
}
|
2878
|
+
|
2879
|
+
GITypeTag type_tag = g_type_info_get_tag(type_info);
|
2867
2880
|
switch (type_tag) {
|
2868
2881
|
case GI_TYPE_TAG_VOID:
|
2869
2882
|
g_assert_not_reached();
|
@@ -3044,8 +3057,8 @@ rb_gi_arguments_fill_raw_results(RBGIArguments *args,
|
|
3044
3057
|
return_type_info = g_callable_info_get_return_type(args->info);
|
3045
3058
|
return_type_tag = g_type_info_get_tag(return_type_info);
|
3046
3059
|
if (return_type_tag != GI_TYPE_TAG_VOID) {
|
3047
|
-
GITransfer transfer;
|
3048
|
-
|
3060
|
+
GITransfer transfer = g_callable_info_get_caller_owns(args->info);
|
3061
|
+
gboolean may_return_null = g_callable_info_may_return_null(args->info);
|
3049
3062
|
if (args->out_args->len == 0) {
|
3050
3063
|
VALUE rb_return_value = rb_results;
|
3051
3064
|
rb_gi_arguments_fill_raw_result(args,
|
@@ -3053,6 +3066,7 @@ rb_gi_arguments_fill_raw_results(RBGIArguments *args,
|
|
3053
3066
|
raw_return_value,
|
3054
3067
|
return_type_info,
|
3055
3068
|
transfer,
|
3069
|
+
may_return_null,
|
3056
3070
|
TRUE);
|
3057
3071
|
} else {
|
3058
3072
|
VALUE rb_return_value;
|
@@ -3067,6 +3081,7 @@ rb_gi_arguments_fill_raw_results(RBGIArguments *args,
|
|
3067
3081
|
raw_return_value,
|
3068
3082
|
return_type_info,
|
3069
3083
|
transfer,
|
3084
|
+
may_return_null,
|
3070
3085
|
TRUE);
|
3071
3086
|
}
|
3072
3087
|
}
|
@@ -3106,6 +3121,7 @@ rb_gi_arguments_fill_raw_results(RBGIArguments *args,
|
|
3106
3121
|
argument->v_pointer,
|
3107
3122
|
type_info,
|
3108
3123
|
transfer,
|
3124
|
+
metadata->may_be_null_p,
|
3109
3125
|
FALSE);
|
3110
3126
|
g_base_info_unref(type_info);
|
3111
3127
|
}
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"of any GObject C libraries"
|
30
30
|
s.author = "The Ruby-GNOME Project Team"
|
31
31
|
s.email = "ruby-gnome2-devel-en@lists.sourceforge.net"
|
32
|
-
s.homepage = "https://ruby-
|
32
|
+
s.homepage = "https://ruby-gnome.github.io/"
|
33
33
|
s.licenses = ["LGPL-2.1+"]
|
34
34
|
s.version = ruby_glib2_version
|
35
35
|
s.extensions = ["ext/#{s.name}/extconf.rb"]
|
@@ -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
|
@@ -83,10 +83,12 @@ module GObjectIntrospection
|
|
83
83
|
def load_function_info(info)
|
84
84
|
name = rubyish_method_name(info)
|
85
85
|
define_singleton_method(info, @base_module, name)
|
86
|
+
define_equal_style_setter(info, @base_module.singleton_class, name)
|
86
87
|
end
|
87
88
|
|
88
89
|
def load_function_info_singleton_method(info, klass, method_name)
|
89
90
|
define_singleton_method(info, klass, method_name)
|
91
|
+
define_equal_style_setter(info, klass.singleton_class, method_name)
|
90
92
|
end
|
91
93
|
|
92
94
|
def define_module_function(function_info, target_module, name)
|
@@ -185,8 +187,8 @@ module GObjectIntrospection
|
|
185
187
|
# TODO: Can we do the same things for flags on NONE GType?
|
186
188
|
return if info.gtype == GLib::Type::NONE
|
187
189
|
klass = self.class.define_class(info.gtype,
|
188
|
-
|
189
|
-
|
190
|
+
rubyish_class_name(info),
|
191
|
+
@base_module)
|
190
192
|
prepare_class(klass) do
|
191
193
|
load_methods(info, klass)
|
192
194
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME Project Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2024-
|
10
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: glib2
|
@@ -15,14 +15,14 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - '='
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 4.2.
|
18
|
+
version: 4.2.3
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - '='
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 4.2.
|
25
|
+
version: 4.2.3
|
26
26
|
description: Ruby/GObjectIntrospection provides bindings of GObject Introspection
|
27
27
|
and a loader module that can generate dynamically Ruby bindings of any GObject C
|
28
28
|
libraries
|
@@ -129,7 +129,7 @@ files:
|
|
129
129
|
- test/test-value-info.rb
|
130
130
|
- test/test-version.rb
|
131
131
|
- test/test-vfunc-info.rb
|
132
|
-
homepage: https://ruby-
|
132
|
+
homepage: https://ruby-gnome.github.io/
|
133
133
|
licenses:
|
134
134
|
- LGPL-2.1+
|
135
135
|
metadata:
|