gobject-introspection 3.0.8-x64-mingw32 → 3.0.9-x64-mingw32
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 +4 -4
- data/Rakefile +1 -1
- data/ext/gobject-introspection/rb-gi-argument.c +91 -4
- data/ext/gobject-introspection/rb-gi-function-info.c +27 -3
- data/lib/2.2/gobject_introspection.so +0 -0
- data/lib/2.3/gobject_introspection.so +0 -0
- data/lib/gobject-introspection/arg-info.rb +7 -0
- data/lib/gobject-introspection/callable-info.rb +42 -37
- data/lib/gobject-introspection/collection-reader.rb +10 -3
- data/lib/gobject-introspection/loader.rb +40 -21
- data/vendor/local/bin/g-ir-compiler.exe +0 -0
- data/vendor/local/lib/girepository-1.0/GLib-2.0.typelib +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/msvccompiler.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/msvccompiler.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
- data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
- data/vendor/local/share/gir-1.0/GLib-2.0.gir +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0bc2284cca56f4a2387ad477e3c2dad10ae1a82
|
4
|
+
data.tar.gz: 54fce020c48c4f56b5269f16568feb6c7e0ebbf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14af21663b2f053c1d01a38b3cfcd7aa8a5ed12cf03f4083c306710b7fe00d6335398c3f7e45ca863d669dd200df2cd95e2b5799b8e0cb59e56b12aa5116de37
|
7
|
+
data.tar.gz: 8000394c87c1fb0b4ec39be777113b1d52febffac102c10bb9acd297d43d9b1f77c9692dbfa89ae902e31903555d23095e0930e63d3a890e533728c193a8ca73
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2012-
|
3
|
+
* Copyright (C) 2012-2016 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
|
@@ -191,7 +191,7 @@ array_c_to_ruby_sized(gconstpointer *elements,
|
|
191
191
|
case GI_TYPE_TAG_INT32:
|
192
192
|
g_base_info_unref(element_type_info);
|
193
193
|
{
|
194
|
-
const
|
194
|
+
const gint32 *numbers = (const gint32 *)elements;
|
195
195
|
for (i = 0; i < n_elements; i++) {
|
196
196
|
rb_ary_push(rb_array, INT2NUM(numbers[i]));
|
197
197
|
}
|
@@ -945,6 +945,86 @@ rb_gi_argument_to_ruby_glist(GIArgument *argument, GITypeInfo *type_info)
|
|
945
945
|
return rb_argument;
|
946
946
|
}
|
947
947
|
|
948
|
+
static VALUE
|
949
|
+
rb_gi_argument_to_ruby_gslist_interface(GIArgument *argument,
|
950
|
+
G_GNUC_UNUSED GITypeInfo *type_info,
|
951
|
+
GITypeInfo *element_type_info)
|
952
|
+
{
|
953
|
+
VALUE rb_argument = Qnil;
|
954
|
+
GIBaseInfo *interface_info;
|
955
|
+
GIInfoType interface_type;
|
956
|
+
const gchar *interface_name;
|
957
|
+
GType gtype;
|
958
|
+
|
959
|
+
interface_info = g_type_info_get_interface(element_type_info);
|
960
|
+
interface_type = g_base_info_get_type(interface_info);
|
961
|
+
interface_name = g_info_type_to_string(interface_type);
|
962
|
+
gtype = g_registered_type_info_get_g_type(interface_info);
|
963
|
+
|
964
|
+
switch (interface_type) {
|
965
|
+
case GI_INFO_TYPE_INVALID:
|
966
|
+
case GI_INFO_TYPE_FUNCTION:
|
967
|
+
case GI_INFO_TYPE_CALLBACK:
|
968
|
+
g_base_info_unref(interface_info);
|
969
|
+
g_base_info_unref(element_type_info);
|
970
|
+
rb_raise(rb_eNotImpError,
|
971
|
+
"TODO: GIArgument(GSList)[interface(%s)](%s) -> Ruby",
|
972
|
+
interface_name,
|
973
|
+
g_type_name(gtype));
|
974
|
+
break;
|
975
|
+
case GI_INFO_TYPE_STRUCT:
|
976
|
+
if (gtype == G_TYPE_NONE) {
|
977
|
+
GSList *node;
|
978
|
+
rb_argument = rb_ary_new();
|
979
|
+
for (node = argument->v_pointer; node; node = g_slist_next(node)) {
|
980
|
+
rb_ary_push(rb_argument,
|
981
|
+
interface_struct_to_ruby(node->data,
|
982
|
+
FALSE,
|
983
|
+
element_type_info,
|
984
|
+
interface_info));
|
985
|
+
}
|
986
|
+
} else {
|
987
|
+
rb_argument = BOXEDGLIST2RVAL(argument->v_pointer, gtype);
|
988
|
+
}
|
989
|
+
break;
|
990
|
+
case GI_INFO_TYPE_BOXED:
|
991
|
+
rb_argument = BOXEDGLIST2RVAL(argument->v_pointer, gtype);
|
992
|
+
break;
|
993
|
+
case GI_INFO_TYPE_ENUM:
|
994
|
+
case GI_INFO_TYPE_FLAGS:
|
995
|
+
case GI_INFO_TYPE_OBJECT:
|
996
|
+
case GI_INFO_TYPE_INTERFACE:
|
997
|
+
rb_argument = GOBJGLIST2RVAL(argument->v_pointer);
|
998
|
+
break;
|
999
|
+
case GI_INFO_TYPE_CONSTANT:
|
1000
|
+
case GI_INFO_TYPE_INVALID_0:
|
1001
|
+
case GI_INFO_TYPE_UNION:
|
1002
|
+
case GI_INFO_TYPE_VALUE:
|
1003
|
+
case GI_INFO_TYPE_SIGNAL:
|
1004
|
+
case GI_INFO_TYPE_VFUNC:
|
1005
|
+
case GI_INFO_TYPE_PROPERTY:
|
1006
|
+
case GI_INFO_TYPE_FIELD:
|
1007
|
+
case GI_INFO_TYPE_ARG:
|
1008
|
+
case GI_INFO_TYPE_TYPE:
|
1009
|
+
case GI_INFO_TYPE_UNRESOLVED:
|
1010
|
+
g_base_info_unref(interface_info);
|
1011
|
+
g_base_info_unref(element_type_info);
|
1012
|
+
rb_raise(rb_eNotImpError,
|
1013
|
+
"TODO: GIArgument(GSList)[interface(%s)](%s) -> Ruby",
|
1014
|
+
interface_name,
|
1015
|
+
g_type_name(gtype));
|
1016
|
+
break;
|
1017
|
+
default:
|
1018
|
+
g_assert_not_reached();
|
1019
|
+
break;
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
g_base_info_unref(interface_info);
|
1023
|
+
g_base_info_unref(element_type_info);
|
1024
|
+
|
1025
|
+
return rb_argument;
|
1026
|
+
}
|
1027
|
+
|
948
1028
|
static VALUE
|
949
1029
|
rb_gi_argument_to_ruby_gslist(GIArgument *argument, GITypeInfo *type_info)
|
950
1030
|
{
|
@@ -954,7 +1034,6 @@ rb_gi_argument_to_ruby_gslist(GIArgument *argument, GITypeInfo *type_info)
|
|
954
1034
|
|
955
1035
|
element_type_info = g_type_info_get_param_type(type_info, 0);
|
956
1036
|
element_type_tag = g_type_info_get_tag(element_type_info);
|
957
|
-
g_base_info_unref(element_type_info);
|
958
1037
|
|
959
1038
|
switch (element_type_tag) {
|
960
1039
|
case GI_TYPE_TAG_VOID:
|
@@ -970,34 +1049,42 @@ rb_gi_argument_to_ruby_gslist(GIArgument *argument, GITypeInfo *type_info)
|
|
970
1049
|
case GI_TYPE_TAG_FLOAT:
|
971
1050
|
case GI_TYPE_TAG_DOUBLE:
|
972
1051
|
case GI_TYPE_TAG_GTYPE:
|
1052
|
+
g_base_info_unref(element_type_info);
|
973
1053
|
rb_raise(rb_eNotImpError,
|
974
1054
|
"TODO: GIArgument(GSList)[%s] -> Ruby",
|
975
1055
|
g_type_tag_to_string(element_type_tag));
|
976
1056
|
break;
|
977
1057
|
case GI_TYPE_TAG_UTF8:
|
1058
|
+
g_base_info_unref(element_type_info);
|
978
1059
|
rb_argument = CSTRGSLIST2RVAL(argument->v_pointer);
|
979
1060
|
break;
|
980
1061
|
case GI_TYPE_TAG_FILENAME:
|
1062
|
+
g_base_info_unref(element_type_info);
|
981
1063
|
rb_argument = FILENAMEGSLIST2RVAL(argument->v_pointer);
|
982
1064
|
break;
|
983
1065
|
case GI_TYPE_TAG_ARRAY:
|
1066
|
+
g_base_info_unref(element_type_info);
|
984
1067
|
rb_raise(rb_eNotImpError,
|
985
1068
|
"TODO: GIArgument(GSList)[%s] -> Ruby",
|
986
1069
|
g_type_tag_to_string(element_type_tag));
|
987
1070
|
break;
|
988
1071
|
case GI_TYPE_TAG_INTERFACE:
|
989
|
-
rb_argument =
|
1072
|
+
rb_argument = rb_gi_argument_to_ruby_gslist_interface(argument,
|
1073
|
+
type_info,
|
1074
|
+
element_type_info);
|
990
1075
|
break;
|
991
1076
|
case GI_TYPE_TAG_GLIST:
|
992
1077
|
case GI_TYPE_TAG_GSLIST:
|
993
1078
|
case GI_TYPE_TAG_GHASH:
|
994
1079
|
case GI_TYPE_TAG_ERROR:
|
995
1080
|
case GI_TYPE_TAG_UNICHAR:
|
1081
|
+
g_base_info_unref(element_type_info);
|
996
1082
|
rb_raise(rb_eNotImpError,
|
997
1083
|
"TODO: GIArgument(GSList)[%s] -> Ruby",
|
998
1084
|
g_type_tag_to_string(element_type_tag));
|
999
1085
|
break;
|
1000
1086
|
default:
|
1087
|
+
g_base_info_unref(element_type_info);
|
1001
1088
|
g_assert_not_reached();
|
1002
1089
|
break;
|
1003
1090
|
}
|
@@ -214,6 +214,29 @@ fill_metadata_array(GPtrArray *args_metadata)
|
|
214
214
|
}
|
215
215
|
}
|
216
216
|
|
217
|
+
static void
|
218
|
+
fill_metadata_array_from_callable_info(GPtrArray *args_metadata,
|
219
|
+
GICallableInfo *info)
|
220
|
+
{
|
221
|
+
GITypeInfo return_type_info;
|
222
|
+
RBGIArgMetadata *array_length_metadata;
|
223
|
+
gint array_length_index = -1;
|
224
|
+
|
225
|
+
g_callable_info_load_return_type(info, &return_type_info);
|
226
|
+
if (g_type_info_get_tag(&return_type_info) != GI_TYPE_TAG_ARRAY) {
|
227
|
+
return;
|
228
|
+
}
|
229
|
+
|
230
|
+
array_length_index = g_type_info_get_array_length(&return_type_info);
|
231
|
+
if (array_length_index == -1) {
|
232
|
+
return;
|
233
|
+
}
|
234
|
+
|
235
|
+
array_length_metadata = g_ptr_array_index(args_metadata, array_length_index);
|
236
|
+
array_length_metadata->array_length_p = TRUE;
|
237
|
+
array_length_metadata->rb_arg_index = -1;
|
238
|
+
}
|
239
|
+
|
217
240
|
static void
|
218
241
|
fill_metadata_rb_arg_index(GPtrArray *args_metadata)
|
219
242
|
{
|
@@ -251,10 +274,11 @@ fill_metadata_rb_arg_index(GPtrArray *args_metadata)
|
|
251
274
|
}
|
252
275
|
|
253
276
|
static void
|
254
|
-
fill_metadata(GPtrArray *args_metadata)
|
277
|
+
fill_metadata(GPtrArray *args_metadata, GICallableInfo *info)
|
255
278
|
{
|
256
279
|
fill_metadata_callback(args_metadata);
|
257
280
|
fill_metadata_array(args_metadata);
|
281
|
+
fill_metadata_array_from_callable_info(args_metadata, info);
|
258
282
|
fill_metadata_rb_arg_index(args_metadata);
|
259
283
|
}
|
260
284
|
|
@@ -866,7 +890,7 @@ ffi_closure_callback(G_GNUC_UNUSED ffi_cif *cif,
|
|
866
890
|
in_args,
|
867
891
|
out_args,
|
868
892
|
args_metadata);
|
869
|
-
fill_metadata(args_metadata);
|
893
|
+
fill_metadata(args_metadata, callback->callback_info);
|
870
894
|
arguments_from_raw_data(callback->callback_info,
|
871
895
|
raw_args,
|
872
896
|
in_args,
|
@@ -1071,7 +1095,7 @@ arguments_from_ruby(GICallableInfo *info, VALUE self, VALUE rb_arguments,
|
|
1071
1095
|
gint i, n_args;
|
1072
1096
|
|
1073
1097
|
allocate_arguments(info, in_args, out_args, args_metadata);
|
1074
|
-
fill_metadata(args_metadata);
|
1098
|
+
fill_metadata(args_metadata, info);
|
1075
1099
|
|
1076
1100
|
n_args = g_callable_info_get_n_args(info);
|
1077
1101
|
for (i = 0; i < n_args; i++) {
|
Binary file
|
Binary file
|
@@ -17,6 +17,13 @@
|
|
17
17
|
module GObjectIntrospection
|
18
18
|
class ArgInfo
|
19
19
|
def gclosure?
|
20
|
+
@gclosure_p ||= nil
|
21
|
+
return @gclosure_p unless @gclosure_p.nil?
|
22
|
+
@gclosure_p = compute_gclosure?
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
def compute_gclosure?
|
20
27
|
type_info = type
|
21
28
|
return false if type_info.tag != TypeTag::INTERFACE
|
22
29
|
|
@@ -23,6 +23,48 @@ module GObjectIntrospection
|
|
23
23
|
collection_reader("args")
|
24
24
|
|
25
25
|
def in_args
|
26
|
+
@in_args ||= compute_in_args
|
27
|
+
end
|
28
|
+
|
29
|
+
def required_in_args
|
30
|
+
@required_in_args ||= in_args.reject do |arg|
|
31
|
+
arg.may_be_null?
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def n_in_args
|
36
|
+
in_args.size
|
37
|
+
end
|
38
|
+
|
39
|
+
def n_required_in_args
|
40
|
+
required_in_args.size
|
41
|
+
end
|
42
|
+
|
43
|
+
def require_callback?
|
44
|
+
args.any? do |arg|
|
45
|
+
arg.direction == Direction::IN and
|
46
|
+
arg.scope != ScopeType::INVALID and
|
47
|
+
!arg.may_be_null?
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def out_args
|
52
|
+
@out_args ||= args.find_all do |arg|
|
53
|
+
case arg.direction
|
54
|
+
when Direction::OUT, Direction::INOUT
|
55
|
+
true
|
56
|
+
else
|
57
|
+
false
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def n_out_args
|
63
|
+
out_args.size
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
def compute_in_args
|
26
68
|
array_length_indexes = []
|
27
69
|
callback_indexes = []
|
28
70
|
closure_indexes = []
|
@@ -61,42 +103,5 @@ module GObjectIntrospection
|
|
61
103
|
end
|
62
104
|
end
|
63
105
|
end
|
64
|
-
|
65
|
-
def required_in_args
|
66
|
-
in_args.reject do |arg|
|
67
|
-
arg.may_be_null?
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
def n_in_args
|
72
|
-
in_args.size
|
73
|
-
end
|
74
|
-
|
75
|
-
def n_required_in_args
|
76
|
-
required_in_args.size
|
77
|
-
end
|
78
|
-
|
79
|
-
def require_callback?
|
80
|
-
args.any? do |arg|
|
81
|
-
arg.direction == Direction::IN and
|
82
|
-
arg.scope != ScopeType::INVALID and
|
83
|
-
!arg.may_be_null?
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
def out_args
|
88
|
-
args.find_all do |arg|
|
89
|
-
case arg.direction
|
90
|
-
when Direction::OUT, Direction::INOUT
|
91
|
-
true
|
92
|
-
else
|
93
|
-
false
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
def n_out_args
|
99
|
-
out_args.size
|
100
|
-
end
|
101
106
|
end
|
102
107
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
1
|
+
# Copyright (C) 2012-2016 Ruby-GNOME2 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
|
@@ -24,9 +24,16 @@ module GObjectIntrospection
|
|
24
24
|
singular = name.sub(/s\z/, "")
|
25
25
|
end
|
26
26
|
getter = "get_#{singular}"
|
27
|
+
cache_name = "@#{name}"
|
27
28
|
define_method(name) do
|
28
|
-
|
29
|
-
|
29
|
+
if instance_variable_defined?(cache_name)
|
30
|
+
instance_variable_get(cache_name)
|
31
|
+
else
|
32
|
+
collection = send(n_getter).times.collect do |i|
|
33
|
+
send(getter, i)
|
34
|
+
end
|
35
|
+
instance_variable_set(cache_name, collection)
|
36
|
+
collection
|
30
37
|
end
|
31
38
|
end
|
32
39
|
end
|
@@ -121,11 +121,12 @@ module GObjectIntrospection
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def define_struct(info, options={})
|
124
|
+
name = rubyish_class_name(info)
|
124
125
|
if info.gtype == GLib::Type::NONE
|
125
|
-
klass = self.class.define_struct(info.size,
|
126
|
+
klass = self.class.define_struct(info.size, name, @base_module,
|
126
127
|
:parent => options[:parent])
|
127
128
|
else
|
128
|
-
klass = self.class.define_class(info.gtype,
|
129
|
+
klass = self.class.define_class(info.gtype, name, @base_module,
|
129
130
|
:parent => options[:parent],
|
130
131
|
:size => info.size)
|
131
132
|
end
|
@@ -136,7 +137,7 @@ module GObjectIntrospection
|
|
136
137
|
def load_struct_info(info)
|
137
138
|
case info.name
|
138
139
|
when /Class\z/
|
139
|
-
base_class_name =
|
140
|
+
base_class_name = rubyish_class_name(info)
|
140
141
|
method_infos = info.methods.find_all do |method_info|
|
141
142
|
method_info.is_a?(MethodInfo)
|
142
143
|
end
|
@@ -169,26 +170,18 @@ module GObjectIntrospection
|
|
169
170
|
|
170
171
|
def define_enum(info)
|
171
172
|
self.class.define_class(info.gtype,
|
172
|
-
|
173
|
+
rubyish_class_name(info),
|
173
174
|
@base_module)
|
174
175
|
end
|
175
176
|
|
176
|
-
def enum_class_name(info)
|
177
|
-
info.name
|
178
|
-
end
|
179
|
-
|
180
177
|
def define_error(info)
|
181
178
|
self.class.define_error(info.error_domain,
|
182
|
-
|
179
|
+
rubyish_class_name(info),
|
183
180
|
@base_module,
|
184
181
|
:parent => error_parent_class(info),
|
185
182
|
:gtype => info.gtype)
|
186
183
|
end
|
187
184
|
|
188
|
-
def error_class_name(info)
|
189
|
-
info.name
|
190
|
-
end
|
191
|
-
|
192
185
|
def error_parent_class(info)
|
193
186
|
nil
|
194
187
|
end
|
@@ -199,7 +192,7 @@ module GObjectIntrospection
|
|
199
192
|
info.values.each do |value_info|
|
200
193
|
load_enum_value(value_info, enum_module)
|
201
194
|
end
|
202
|
-
@base_module.const_set(info
|
195
|
+
@base_module.const_set(rubyish_class_name(info), enum_module)
|
203
196
|
else
|
204
197
|
if info.error_domain
|
205
198
|
define_error(info)
|
@@ -219,7 +212,7 @@ module GObjectIntrospection
|
|
219
212
|
info.values.each do |value_info|
|
220
213
|
load_flag_value(value_info, flags_module)
|
221
214
|
end
|
222
|
-
@base_module.const_set(info
|
215
|
+
@base_module.const_set(rubyish_class_name(info), flags_module)
|
223
216
|
else
|
224
217
|
self.class.define_class(info.gtype, flags_class_name(info), @base_module)
|
225
218
|
end
|
@@ -230,7 +223,9 @@ module GObjectIntrospection
|
|
230
223
|
end
|
231
224
|
|
232
225
|
def load_object_info(info)
|
233
|
-
klass = self.class.define_class(info.gtype,
|
226
|
+
klass = self.class.define_class(info.gtype,
|
227
|
+
rubyish_class_name(info),
|
228
|
+
@base_module)
|
234
229
|
load_fields(info, klass)
|
235
230
|
load_methods(info, klass)
|
236
231
|
end
|
@@ -414,7 +409,9 @@ module GObjectIntrospection
|
|
414
409
|
when InfoType::STRUCT
|
415
410
|
match_argument_interface_struct?(arg_info, interface, argument)
|
416
411
|
when InfoType::OBJECT,
|
417
|
-
InfoType::INTERFACE
|
412
|
+
InfoType::INTERFACE,
|
413
|
+
InfoType::FLAGS,
|
414
|
+
InfoType::ENUM
|
418
415
|
argument.is_a?(interface.gtype.to_class)
|
419
416
|
else
|
420
417
|
# TODO
|
@@ -468,7 +465,7 @@ module GObjectIntrospection
|
|
468
465
|
else
|
469
466
|
name
|
470
467
|
end
|
471
|
-
when /\A(?:has|use|can|in|.*_is)_/
|
468
|
+
when /\A(?:has|use|can|in|on|.*_is)_/
|
472
469
|
"#{name}?"
|
473
470
|
when "exists"
|
474
471
|
"exist?"
|
@@ -504,6 +501,21 @@ module GObjectIntrospection
|
|
504
501
|
end
|
505
502
|
end
|
506
503
|
|
504
|
+
def rubyish_class_name(info)
|
505
|
+
name = info.name
|
506
|
+
case info
|
507
|
+
when StructInfo
|
508
|
+
case name
|
509
|
+
when /Class\z/
|
510
|
+
$PREMATCH
|
511
|
+
else
|
512
|
+
name
|
513
|
+
end
|
514
|
+
else
|
515
|
+
name
|
516
|
+
end
|
517
|
+
end
|
518
|
+
|
507
519
|
def should_unlock_gvl?(function_info, klass)
|
508
520
|
false
|
509
521
|
end
|
@@ -537,10 +549,11 @@ module GObjectIntrospection
|
|
537
549
|
validate_arguments(info, "#{klass}\##{method_name}", arguments)
|
538
550
|
[arguments, block]
|
539
551
|
end
|
552
|
+
require_callback_p = info.require_callback?
|
540
553
|
klass.__send__(:define_method, method_name) do |*arguments, &block|
|
541
554
|
arguments = [self] + arguments if function_info_p
|
542
555
|
arguments, block = prepare.call(arguments, &block)
|
543
|
-
if block.nil? and
|
556
|
+
if block.nil? and require_callback_p
|
544
557
|
to_enum(method_name, *arguments)
|
545
558
|
else
|
546
559
|
options = {
|
@@ -577,12 +590,18 @@ module GObjectIntrospection
|
|
577
590
|
|
578
591
|
def load_interface_info(info)
|
579
592
|
interface_module =
|
580
|
-
self.class.define_interface(info.gtype,
|
593
|
+
self.class.define_interface(info.gtype,
|
594
|
+
rubyish_class_name(info),
|
595
|
+
@base_module)
|
581
596
|
load_methods(info, interface_module)
|
582
597
|
end
|
583
598
|
|
584
599
|
def load_constant_info(info)
|
585
|
-
|
600
|
+
define_constant(info.name, info)
|
601
|
+
end
|
602
|
+
|
603
|
+
def define_constant(name, info)
|
604
|
+
@base_module.const_set(name, info.value)
|
586
605
|
end
|
587
606
|
|
588
607
|
def load_union_info(info)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -12964,7 +12964,7 @@ linked against at application run time.</doc>
|
|
12964
12964
|
<doc xml:space="preserve">The maximum value which can be held in a #guint8.</doc>
|
12965
12965
|
<type name="guint8" c:type="guint8"/>
|
12966
12966
|
</constant>
|
12967
|
-
<constant name="MICRO_VERSION" value="
|
12967
|
+
<constant name="MICRO_VERSION" value="1" c:type="GLIB_MICRO_VERSION">
|
12968
12968
|
<doc xml:space="preserve">The micro version number of the GLib library.
|
12969
12969
|
|
12970
12970
|
Like #gtk_micro_version, but from the headers used at
|
@@ -20515,7 +20515,7 @@ it using g_strfreev()</doc>
|
|
20515
20515
|
value="112"
|
20516
20516
|
c:identifier="G_REGEX_ERROR_UNRECOGNIZED_CHARACTER">
|
20517
20517
|
<doc xml:space="preserve">Unrecognized character after "(?",
|
20518
|
-
"(?&
|
20518
|
+
"(?<" or "(?P". Since 2.16</doc>
|
20519
20519
|
</member>
|
20520
20520
|
<member name="posix_named_class_outside_class"
|
20521
20521
|
value="113"
|
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.0.
|
4
|
+
version: 3.0.9
|
5
5
|
platform: x64-mingw32
|
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
|
+
date: 2016-08-12 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.0.
|
19
|
+
version: 3.0.9
|
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.0.
|
26
|
+
version: 3.0.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: test-unit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -352,7 +352,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
352
352
|
requirements:
|
353
353
|
- - ">="
|
354
354
|
- !ruby/object:Gem::Version
|
355
|
-
version: 1.
|
355
|
+
version: 2.1.0
|
356
356
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
357
357
|
requirements:
|
358
358
|
- - ">="
|