gobject-introspection 3.2.1 → 3.2.2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d78f600ec01daea27a9cca73efdaa86e1b178162f26b9e27d6cb71b38131dbd0
|
4
|
+
data.tar.gz: 57caa7b0f52b4d2f03e5ecd8f604b9390db638dce4e4a1abd50594149a643595
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2620c5957b53da3d2a34f9feaa59d80677170f8b62ca39c8e3f291a47783e213244d1c84040ada942c1aac7aba856540b7b4d0e589b0e831d4915b4bf830a02
|
7
|
+
data.tar.gz: 13f82d2e59f5186d7b43e2c97b69b85c6f1fdb392645a4c358cd2caf5880f987ecaa5c4043fdc88236cfac1c96165437f8b26cbf9b728d77a1119b30b2e1dc68
|
data/Rakefile
CHANGED
@@ -32,7 +32,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
32
32
|
:name => "glib",
|
33
33
|
:download_site => :gnome,
|
34
34
|
:label => "GLib",
|
35
|
-
:version => "2.
|
35
|
+
:version => "2.56.0",
|
36
36
|
:compression_method => "xz",
|
37
37
|
:windows => {
|
38
38
|
:build => false,
|
@@ -47,7 +47,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
47
47
|
:name => "gobject-introspection",
|
48
48
|
:download_site => :gnome,
|
49
49
|
:label => "gobject-introspection",
|
50
|
-
:version => "1.
|
50
|
+
:version => "1.56.0",
|
51
51
|
:compression_method => "xz",
|
52
52
|
:windows => {
|
53
53
|
:configure_args => [
|
@@ -58,12 +58,12 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
58
58
|
"support-external-g-ir-scanner.diff",
|
59
59
|
],
|
60
60
|
:need_autoreconf => true,
|
61
|
+
:build_concurrently => false,
|
61
62
|
:built_file => "bin/libgirepository-1.0-1.dll",
|
62
63
|
},
|
63
64
|
:native => {
|
64
65
|
:build => true,
|
65
66
|
:patches => [
|
66
|
-
# "cross-compilable-g-ir-scanner.diff",
|
67
67
|
],
|
68
68
|
:built_file => "bin/g-ir-scanner",
|
69
69
|
}
|
@@ -74,20 +74,23 @@ package_task.define
|
|
74
74
|
|
75
75
|
namespace :native do
|
76
76
|
namespace :"gobject-introspection" do
|
77
|
+
patched_paths = []
|
78
|
+
|
77
79
|
g_ir_scanner_dir = package_task.native.absolute_binary_dir
|
78
80
|
g_ir_scanner_dir += "lib/gobject-introspection/giscanner"
|
79
|
-
|
80
|
-
|
81
|
+
g_ir_scanner_patched_path = g_ir_scanner_dir + "patched"
|
82
|
+
patched_paths << g_ir_scanner_patched_path
|
83
|
+
file g_ir_scanner_patched_path.to_s do
|
81
84
|
Dir.chdir(g_ir_scanner_dir.to_s) do
|
82
85
|
patch = "#{package_task.package.patches_dir}/cross-g-ir-scanner.diff"
|
83
86
|
sh("patch -p2 < #{patch}")
|
84
87
|
rm_f(Dir.glob("*.{pyc,pyo}"))
|
85
88
|
end
|
86
|
-
touch(
|
89
|
+
touch(g_ir_scanner_patched_path)
|
87
90
|
end
|
88
91
|
|
89
92
|
desc "Make g-ir-scanner workable for Windows on non Windows"
|
90
|
-
task :cross =>
|
93
|
+
task :cross => patched_paths
|
91
94
|
end
|
92
95
|
|
93
96
|
namespace :builder do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2012-
|
3
|
+
* Copyright (C) 2012-2018 Ruby-GNOME2 Project Team
|
4
4
|
*
|
5
5
|
* This library is free software; you can redistribute it and/or
|
6
6
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -21,6 +21,7 @@
|
|
21
21
|
#include "rb-gi-private.h"
|
22
22
|
|
23
23
|
static VALUE rb_cGLibValue = Qnil;
|
24
|
+
static VALUE rb_cGLibBytes = Qnil;
|
24
25
|
|
25
26
|
static const gchar *
|
26
27
|
rb_gi_transfer_to_string(GITransfer transfer)
|
@@ -267,6 +268,14 @@ array_c_to_ruby_sized(gconstpointer *elements,
|
|
267
268
|
}
|
268
269
|
break;
|
269
270
|
case GI_TYPE_TAG_FILENAME:
|
271
|
+
g_base_info_unref(element_type_info);
|
272
|
+
{
|
273
|
+
const gchar **filenames = (const gchar **)elements;
|
274
|
+
for (i = 0; i < n_elements; i++) {
|
275
|
+
rb_ary_push(rb_array, CSTRFILENAME2RVAL(filenames[i]));
|
276
|
+
}
|
277
|
+
}
|
278
|
+
break;
|
270
279
|
case GI_TYPE_TAG_ARRAY:
|
271
280
|
g_base_info_unref(element_type_info);
|
272
281
|
rb_raise(rb_eNotImpError,
|
@@ -1264,10 +1273,10 @@ rb_gi_argument_to_ruby(GIArgument *argument,
|
|
1264
1273
|
rb_argument = UINT2NUM(argument->v_uint32);
|
1265
1274
|
break;
|
1266
1275
|
case GI_TYPE_TAG_INT64:
|
1267
|
-
rb_argument =
|
1276
|
+
rb_argument = LL2NUM(argument->v_int64);
|
1268
1277
|
break;
|
1269
1278
|
case GI_TYPE_TAG_UINT64:
|
1270
|
-
rb_argument =
|
1279
|
+
rb_argument = ULL2NUM(argument->v_uint64);
|
1271
1280
|
break;
|
1272
1281
|
case GI_TYPE_TAG_FLOAT:
|
1273
1282
|
rb_argument = DBL2NUM(argument->v_float);
|
@@ -2281,6 +2290,8 @@ rb_gi_return_argument_free_everything_array_c(GIArgument *argument,
|
|
2281
2290
|
g_strfreev(argument->v_pointer);
|
2282
2291
|
break;
|
2283
2292
|
case GI_TYPE_TAG_FILENAME:
|
2293
|
+
g_strfreev(argument->v_pointer);
|
2294
|
+
break;
|
2284
2295
|
case GI_TYPE_TAG_ARRAY:
|
2285
2296
|
case GI_TYPE_TAG_INTERFACE:
|
2286
2297
|
case GI_TYPE_TAG_GLIST:
|
@@ -2869,13 +2880,17 @@ rb_gi_value_argument_from_ruby_interface(GIArgument *argument,
|
|
2869
2880
|
}
|
2870
2881
|
argument->v_pointer = gvalue;
|
2871
2882
|
} else if (gtype == G_TYPE_BYTES) {
|
2872
|
-
|
2873
|
-
|
2883
|
+
if (RVAL2CBOOL(rb_obj_is_kind_of(rb_argument, rb_cGLibBytes))) {
|
2884
|
+
argument->v_pointer = RVAL2BOXED(rb_argument, G_TYPE_BYTES);
|
2885
|
+
} else {
|
2886
|
+
VALUE rb_string;
|
2887
|
+
GBytes *gbytes;
|
2874
2888
|
|
2875
|
-
|
2876
|
-
|
2877
|
-
|
2878
|
-
|
2889
|
+
rb_string = StringValue(rb_argument);
|
2890
|
+
gbytes = g_bytes_new(RSTRING_PTR(rb_string),
|
2891
|
+
RSTRING_LEN(rb_string));
|
2892
|
+
argument->v_pointer = gbytes;
|
2893
|
+
}
|
2879
2894
|
} else if (gtype == G_TYPE_CLOSURE) {
|
2880
2895
|
GClosure *rclosure = NULL;
|
2881
2896
|
|
@@ -3136,10 +3151,10 @@ rb_gi_value_argument_from_ruby(GIArgument *argument, GITypeInfo *type_info,
|
|
3136
3151
|
argument->v_uint32 = NUM2UINT(rb_argument);
|
3137
3152
|
break;
|
3138
3153
|
case GI_TYPE_TAG_INT64:
|
3139
|
-
argument->v_int64 =
|
3154
|
+
argument->v_int64 = NUM2LL(rb_argument);
|
3140
3155
|
break;
|
3141
3156
|
case GI_TYPE_TAG_UINT64:
|
3142
|
-
argument->v_uint64 =
|
3157
|
+
argument->v_uint64 = NUM2ULL(rb_argument);
|
3143
3158
|
break;
|
3144
3159
|
case GI_TYPE_TAG_FLOAT:
|
3145
3160
|
argument->v_float = NUM2DBL(rb_argument);
|
@@ -3406,14 +3421,46 @@ rb_gi_in_argument_transfer(GIArgument *argument, GITransfer transfer,
|
|
3406
3421
|
}
|
3407
3422
|
|
3408
3423
|
GIArgument *
|
3409
|
-
rb_gi_in_argument_from_ruby(
|
3410
|
-
|
3424
|
+
rb_gi_in_argument_from_ruby(GICallableInfo *callable_info,
|
3425
|
+
GIArgument *argument,
|
3426
|
+
GIArgInfo *arg_info,
|
3427
|
+
guint nth_rb_argument,
|
3428
|
+
VALUE rb_argument,
|
3429
|
+
VALUE self)
|
3411
3430
|
{
|
3412
3431
|
GITypeInfo type_info;
|
3413
3432
|
|
3414
|
-
if (
|
3415
|
-
|
3416
|
-
|
3433
|
+
if (NIL_P(rb_argument)) {
|
3434
|
+
if (g_arg_info_may_be_null(arg_info)) {
|
3435
|
+
memset(argument, 0, sizeof(GIArgument));
|
3436
|
+
return argument;
|
3437
|
+
} else {
|
3438
|
+
const char *module_name;
|
3439
|
+
GIBaseInfo *klass;
|
3440
|
+
const char *suffix;
|
3441
|
+
|
3442
|
+
module_name = g_base_info_get_namespace(callable_info);
|
3443
|
+
klass = g_base_info_get_container(callable_info);
|
3444
|
+
if (nth_rb_argument == 1) {
|
3445
|
+
suffix = "st";
|
3446
|
+
} else if (nth_rb_argument == 2) {
|
3447
|
+
suffix = "nd";
|
3448
|
+
} else if (nth_rb_argument == 3) {
|
3449
|
+
suffix = "rd";
|
3450
|
+
} else {
|
3451
|
+
suffix = "th";
|
3452
|
+
}
|
3453
|
+
rb_raise(rb_eArgError,
|
3454
|
+
"<%s%s%s%s%s>: the %u%s argument must not nil: <%s>",
|
3455
|
+
module_name,
|
3456
|
+
klass ? "::" : "",
|
3457
|
+
klass ? g_base_info_get_name(klass) : "",
|
3458
|
+
klass ? "#" : ".",
|
3459
|
+
g_base_info_get_name(callable_info),
|
3460
|
+
nth_rb_argument,
|
3461
|
+
suffix,
|
3462
|
+
g_base_info_get_name(arg_info));
|
3463
|
+
}
|
3417
3464
|
}
|
3418
3465
|
|
3419
3466
|
g_arg_info_load_type(arg_info, &type_info);
|
@@ -4406,4 +4453,5 @@ void
|
|
4406
4453
|
rb_gi_argument_init(void)
|
4407
4454
|
{
|
4408
4455
|
rb_cGLibValue = rb_const_get(mGLib, rb_intern("Value"));
|
4456
|
+
rb_cGLibBytes = rb_const_get(mGLib, rb_intern("Bytes"));
|
4409
4457
|
}
|
@@ -46,9 +46,6 @@
|
|
46
46
|
#define RVAL2GI_VALUE_ARGUMENT(argument, type_info, rb_argument, self) \
|
47
47
|
(rb_gi_value_argument_from_ruby((argument), (type_info), \
|
48
48
|
(rb_argument), (self)))
|
49
|
-
#define RVAL2GI_IN_ARGUMENT(argument, arg_info, rb_argument, self) \
|
50
|
-
(rb_gi_in_argument_from_ruby((argument), (arg_info), \
|
51
|
-
(rb_argument), (self)))
|
52
49
|
#define RVAL2GI_IN_ARRAY_ARGUMENT(array_argument, length_argument, \
|
53
50
|
array_arg_info, length_arg_info, \
|
54
51
|
rb_argument) \
|
@@ -127,8 +124,10 @@ GIArgument *rb_gi_value_argument_from_ruby (GIArgument *argument,
|
|
127
124
|
GITypeInfo *type_info,
|
128
125
|
VALUE rb_argument,
|
129
126
|
VALUE self);
|
130
|
-
GIArgument *rb_gi_in_argument_from_ruby (
|
127
|
+
GIArgument *rb_gi_in_argument_from_ruby (GICallableInfo *callable_info,
|
128
|
+
GIArgument *argument,
|
131
129
|
GIArgInfo *arg_info,
|
130
|
+
guint nth_rb_argument,
|
132
131
|
VALUE rb_argument,
|
133
132
|
VALUE self);
|
134
133
|
GIArgument *rb_gi_in_array_argument_from_ruby (GIArgument *array_argument,
|
@@ -1123,8 +1123,11 @@ in_callback_argument_from_ruby(RBGIArgMetadata *metadata, GArray *in_args)
|
|
1123
1123
|
}
|
1124
1124
|
|
1125
1125
|
static void
|
1126
|
-
in_argument_from_ruby(
|
1127
|
-
|
1126
|
+
in_argument_from_ruby(GICallableInfo *callable_info,
|
1127
|
+
RBGIArgMetadata *metadata,
|
1128
|
+
VALUE rb_arguments,
|
1129
|
+
GArray *in_args,
|
1130
|
+
GPtrArray *args_metadata,
|
1128
1131
|
VALUE self)
|
1129
1132
|
{
|
1130
1133
|
if (metadata->callback_p && !metadata->destroy_p) {
|
@@ -1172,10 +1175,12 @@ in_argument_from_ruby(RBGIArgMetadata *metadata, VALUE rb_arguments,
|
|
1172
1175
|
rb_argument = RARRAY_PTR(rb_arguments)[metadata->rb_arg_index];
|
1173
1176
|
}
|
1174
1177
|
argument = &(g_array_index(in_args, GIArgument, metadata->in_arg_index));
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1178
|
+
rb_gi_in_argument_from_ruby(callable_info,
|
1179
|
+
argument,
|
1180
|
+
&(metadata->arg_info),
|
1181
|
+
metadata->rb_arg_index,
|
1182
|
+
rb_argument,
|
1183
|
+
self);
|
1179
1184
|
}
|
1180
1185
|
}
|
1181
1186
|
|
@@ -1215,8 +1220,12 @@ arguments_from_ruby(GICallableInfo *info, VALUE self, VALUE rb_arguments,
|
|
1215
1220
|
|
1216
1221
|
metadata = g_ptr_array_index(args_metadata, i);
|
1217
1222
|
if (metadata->in_arg_index != -1) {
|
1218
|
-
in_argument_from_ruby(
|
1219
|
-
|
1223
|
+
in_argument_from_ruby(info,
|
1224
|
+
metadata,
|
1225
|
+
rb_arguments,
|
1226
|
+
in_args,
|
1227
|
+
args_metadata,
|
1228
|
+
self);
|
1220
1229
|
} else {
|
1221
1230
|
out_argument_from_ruby(metadata, out_args);
|
1222
1231
|
}
|
@@ -437,6 +437,12 @@ module GObjectIntrospection
|
|
437
437
|
if name == "initialize"
|
438
438
|
name += "_raw"
|
439
439
|
end
|
440
|
+
|
441
|
+
n_in_args = function_info.n_in_args
|
442
|
+
if options[:n_in_args_offset]
|
443
|
+
n_in_args += options[:n_in_args_offset]
|
444
|
+
end
|
445
|
+
|
440
446
|
return_type = function_info.return_type
|
441
447
|
return_type_tag = return_type.tag
|
442
448
|
if return_type_tag == TypeTag::VOID
|
@@ -445,11 +451,12 @@ module GObjectIntrospection
|
|
445
451
|
return_type_tag = TypeTag::ARRAY
|
446
452
|
end
|
447
453
|
end
|
454
|
+
|
448
455
|
case return_type_tag
|
449
456
|
when TypeTag::BOOLEAN
|
450
457
|
case name
|
451
458
|
when "equal"
|
452
|
-
if
|
459
|
+
if n_in_args == 1
|
453
460
|
"=="
|
454
461
|
else
|
455
462
|
name
|
@@ -457,7 +464,7 @@ module GObjectIntrospection
|
|
457
464
|
when /\A(?:is|get_is|can_be)_/
|
458
465
|
"#{$POSTMATCH}?"
|
459
466
|
when /\Aget_/
|
460
|
-
if
|
467
|
+
if n_in_args.zero?
|
461
468
|
if function_info.n_out_args.zero?
|
462
469
|
"#{$POSTMATCH}?"
|
463
470
|
else
|
@@ -476,7 +483,7 @@ module GObjectIntrospection
|
|
476
483
|
when TypeTag::GLIST, TypeTag::GSLIST, TypeTag::ARRAY
|
477
484
|
case name
|
478
485
|
when /\A(?:list|get)_/
|
479
|
-
if
|
486
|
+
if n_in_args.zero?
|
480
487
|
$POSTMATCH
|
481
488
|
else
|
482
489
|
name
|
@@ -487,7 +494,7 @@ module GObjectIntrospection
|
|
487
494
|
else
|
488
495
|
case name
|
489
496
|
when /\Aget_/
|
490
|
-
if
|
497
|
+
if n_in_args.zero?
|
491
498
|
$POSTMATCH
|
492
499
|
else
|
493
500
|
name
|
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.2.
|
4
|
+
version: 3.2.2
|
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:
|
11
|
+
date: 2018-04-02 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.2.
|
19
|
+
version: 3.2.2
|
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.2.
|
26
|
+
version: 3.2.2
|
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.
|
147
|
+
rubygems_version: 2.7.6
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Ruby/GObjectIntrospection is a Ruby binding of GObjectIntrospection.
|