glib2 3.2.4-x86-mingw32 → 3.2.5-x86-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/ext/glib2/glib2.def +3 -0
- data/ext/glib2/rbglib.h +5 -1
- data/ext/glib2/rbgobj_binding.c +9 -1
- data/ext/glib2/rbgobj_closure.c +9 -9
- data/ext/glib2/rbgobj_object.c +82 -14
- data/ext/glib2/rbgobject.c +51 -22
- data/ext/glib2/rbgobject.h +8 -0
- data/ext/glib2/rbgprivate.h +2 -1
- data/lib/2.2/glib2.so +0 -0
- data/lib/2.3/glib2.so +0 -0
- data/lib/2.4/glib2.so +0 -0
- data/lib/2.5/glib2.so +0 -0
- data/vendor/local/bin/asn1Coding.exe +0 -0
- data/vendor/local/bin/asn1Decoding.exe +0 -0
- data/vendor/local/bin/asn1Parser.exe +0 -0
- data/vendor/local/bin/envsubst.exe +0 -0
- data/vendor/local/bin/gdbus.exe +0 -0
- data/vendor/local/bin/gettext.exe +0 -0
- data/vendor/local/bin/gio-querymodules.exe +0 -0
- data/vendor/local/bin/gio.exe +0 -0
- data/vendor/local/bin/glib-compile-resources.exe +0 -0
- data/vendor/local/bin/glib-compile-schemas.exe +0 -0
- data/vendor/local/bin/gobject-query.exe +0 -0
- data/vendor/local/bin/gresource.exe +0 -0
- data/vendor/local/bin/gsettings.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
- data/vendor/local/bin/iconv.exe +0 -0
- data/vendor/local/bin/idn2.exe +0 -0
- data/vendor/local/bin/libasprintf-0.dll +0 -0
- data/vendor/local/bin/libcharset-1.dll +0 -0
- data/vendor/local/bin/libffi-6.dll +0 -0
- data/vendor/local/bin/libgio-2.0-0.dll +0 -0
- data/vendor/local/bin/libglib-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmp-10.dll +0 -0
- data/vendor/local/bin/libgnutls-30.dll +0 -0
- data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
- data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
- data/vendor/local/bin/libhogweed-4-2.dll +0 -0
- data/vendor/local/bin/libiconv-2.dll +0 -0
- data/vendor/local/bin/libidn2-0.dll +0 -0
- data/vendor/local/bin/libintl-8.dll +0 -0
- data/vendor/local/bin/libnettle-6-2.dll +0 -0
- data/vendor/local/bin/libp11-kit-0.dll +0 -0
- data/vendor/local/bin/libpcre-1.dll +0 -0
- data/vendor/local/bin/libpcrecpp-0.dll +0 -0
- data/vendor/local/bin/libpcreposix-0.dll +0 -0
- data/vendor/local/bin/libtasn1-6.dll +0 -0
- data/vendor/local/bin/nettle-hash.exe +0 -0
- data/vendor/local/bin/nettle-lfib-stream.exe +0 -0
- data/vendor/local/bin/nettle-pbkdf2.exe +0 -0
- data/vendor/local/bin/ngettext.exe +0 -0
- data/vendor/local/bin/p11-kit.exe +0 -0
- data/vendor/local/bin/pcregrep.exe +0 -0
- data/vendor/local/bin/pcretest.exe +0 -0
- data/vendor/local/bin/pkcs1-conv.exe +0 -0
- data/vendor/local/bin/sexp-conv.exe +0 -0
- data/vendor/local/bin/trust.exe +0 -0
- data/vendor/local/lib/gio/modules/libgiognutls.dll +0 -0
- data/vendor/local/lib/libasprintf.dll.a +0 -0
- data/vendor/local/lib/libcharset.dll.a +0 -0
- data/vendor/local/lib/libffi.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.dll.a +0 -0
- data/vendor/local/lib/libglib-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmp.dll.a +0 -0
- data/vendor/local/lib/libgnutls.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
- data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
- data/vendor/local/lib/libhogweed.dll.a +0 -0
- data/vendor/local/lib/libiconv.dll.a +0 -0
- data/vendor/local/lib/libidn2.dll.a +0 -0
- data/vendor/local/lib/libintl.dll.a +0 -0
- data/vendor/local/lib/libnettle.dll.a +0 -0
- data/vendor/local/lib/libp11-kit.dll.a +0 -0
- data/vendor/local/lib/libpcre.dll.a +0 -0
- data/vendor/local/lib/libpcrecpp.dll.a +0 -0
- data/vendor/local/lib/libpcreposix.dll.a +0 -0
- data/vendor/local/lib/libtasn1.dll.a +0 -0
- data/vendor/local/lib/pkcs11/p11-kit-trust.dll +0 -0
- data/vendor/local/lib/pkcs11/p11-kit-trust.dll.a +0 -0
- data/vendor/local/libexec/p11-kit/p11-kit-remote.exe +0 -0
- data/vendor/local/share/glib-2.0/codegen/__init__.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/__init__.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_main.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_main.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/config.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/config.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/dbustypes.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/dbustypes.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/parser.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/parser.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/utils.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/utils.pyo +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dc9fb75536659300b6b63e769c353fde8c4f7ee887abdb420d6b8dbae1d0b07
|
4
|
+
data.tar.gz: e9d806e1fcfdf29c1f60011646ffc21a5e9a2c69178b105bbc571ee52e222593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2d5b79b3a6bd1f829f25b201d594e24b95d936f2d554d983b9ef389cf408b9daff8039fbbce4b533b64980decc892b751a2087dcf6b820b26b477e9144589a7
|
7
|
+
data.tar.gz: 9889dbed514d1881d872a75bbd838b62832de287fbad52ec7798410d2d950d3aa29b2226ce40288703a6a67462db887bc58dc0f6b7db1652515d7d8ac1563dfa
|
data/ext/glib2/glib2.def
CHANGED
@@ -61,6 +61,9 @@ EXPORTS
|
|
61
61
|
rbgobj_class_init_func
|
62
62
|
rbgobj_register_type
|
63
63
|
rbgobj_object_alloc_func
|
64
|
+
rbgobj_object_add_relative
|
65
|
+
rbgobj_object_remove_relative
|
66
|
+
rbgobj_object_remove_relatives
|
64
67
|
rbgobj_set_signal_func
|
65
68
|
rbgobj_get_signal_func
|
66
69
|
rbgobj_set_signal_call_func
|
data/ext/glib2/rbglib.h
CHANGED
@@ -36,7 +36,7 @@ extern "C" {
|
|
36
36
|
|
37
37
|
#define RBGLIB_MAJOR_VERSION 3
|
38
38
|
#define RBGLIB_MINOR_VERSION 2
|
39
|
-
#define RBGLIB_MICRO_VERSION
|
39
|
+
#define RBGLIB_MICRO_VERSION 5
|
40
40
|
|
41
41
|
#ifndef RB_ZALLOC
|
42
42
|
# ifdef ZALLOC
|
@@ -46,6 +46,10 @@ extern "C" {
|
|
46
46
|
# endif
|
47
47
|
#endif
|
48
48
|
|
49
|
+
#ifndef RB_ALLOC
|
50
|
+
# define RB_ALLOC(type) ALLOC(type)
|
51
|
+
#endif
|
52
|
+
|
49
53
|
#ifndef RB_ALLOC_N
|
50
54
|
# define RB_ALLOC_N(type, n) ALLOC_N(type, n)
|
51
55
|
#endif
|
data/ext/glib2/rbgobj_binding.c
CHANGED
@@ -28,7 +28,15 @@
|
|
28
28
|
static VALUE
|
29
29
|
rg_unbind(VALUE self)
|
30
30
|
{
|
31
|
-
|
31
|
+
GBinding *binding = _SELF(self);
|
32
|
+
GObject *source;
|
33
|
+
VALUE rb_source;
|
34
|
+
|
35
|
+
source = g_binding_get_source(binding);
|
36
|
+
rb_source = GOBJ2RVAL(source);
|
37
|
+
rbgobj_object_remove_relative(rb_source, self);
|
38
|
+
g_binding_unbind(binding);
|
39
|
+
|
32
40
|
return self;
|
33
41
|
}
|
34
42
|
#endif
|
data/ext/glib2/rbgobj_closure.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011-
|
3
|
+
* Copyright (C) 2011-2018 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2002-2006 Ruby-GNOME2 Project
|
5
5
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
6
6
|
*
|
@@ -191,8 +191,9 @@ rclosure_invalidate(G_GNUC_UNUSED gpointer data, GClosure *closure)
|
|
191
191
|
for (next = rclosure->objects; next; next = next->next) {
|
192
192
|
GObject *object = G_OBJECT(next->data);
|
193
193
|
VALUE obj = rbgobj_ruby_object_from_instance2(object, FALSE);
|
194
|
-
if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj))
|
195
|
-
|
194
|
+
if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj)) {
|
195
|
+
rbgobj_object_remove_relative(obj, rclosure->rb_holder);
|
196
|
+
}
|
196
197
|
}
|
197
198
|
|
198
199
|
rclosure_unref(rclosure);
|
@@ -286,16 +287,15 @@ rclosure_weak_notify(gpointer data, GObject* where_the_object_was)
|
|
286
287
|
void
|
287
288
|
g_rclosure_attach(GClosure *closure, VALUE object)
|
288
289
|
{
|
289
|
-
static VALUE
|
290
|
+
static VALUE cGLibObject = Qnil;
|
290
291
|
GRClosure *rclosure = (GRClosure *)closure;
|
291
292
|
|
292
|
-
|
293
|
-
|
294
|
-
if (!mGLibObject) {
|
295
|
-
mGLibObject = rb_const_get(mGLib, rb_intern("Object"));
|
293
|
+
if (NIL_P(cGLibObject)) {
|
294
|
+
cGLibObject = rb_const_get(mGLib, rb_intern("Object"));
|
296
295
|
}
|
297
|
-
if (rb_obj_is_kind_of(object,
|
296
|
+
if (rb_obj_is_kind_of(object, cGLibObject)) {
|
298
297
|
GObject *gobject;
|
298
|
+
rbgobj_object_add_relative(object, rclosure->rb_holder);
|
299
299
|
gobject = RVAL2GOBJ(object);
|
300
300
|
rclosure->count++;
|
301
301
|
g_object_weak_ref(gobject, rclosure_weak_notify, rclosure);
|
data/ext/glib2/rbgobj_object.c
CHANGED
@@ -43,19 +43,33 @@ weak_notify(gpointer data, G_GNUC_UNUSED GObject *where_the_object_was)
|
|
43
43
|
gobj_holder *holder = data;
|
44
44
|
|
45
45
|
rbgobj_instance_call_cinfo_free(holder->gobj);
|
46
|
-
|
46
|
+
g_hash_table_unref(holder->rb_relatives);
|
47
|
+
holder->rb_relatives = NULL;
|
47
48
|
holder->destroyed = TRUE;
|
48
49
|
|
49
50
|
g_object_unref(holder->gobj);
|
50
51
|
holder->gobj = NULL;
|
51
52
|
}
|
52
53
|
|
54
|
+
static void
|
55
|
+
holder_relatives_mark(gpointer key, gpointer value, gpointer user_data)
|
56
|
+
{
|
57
|
+
VALUE rb_relative = (VALUE)value;
|
58
|
+
rb_gc_mark(rb_relative);
|
59
|
+
}
|
60
|
+
|
53
61
|
static void
|
54
62
|
holder_mark(void *data)
|
55
63
|
{
|
56
64
|
gobj_holder *holder = data;
|
57
|
-
|
58
|
-
|
65
|
+
|
66
|
+
if (!holder->gobj)
|
67
|
+
return;
|
68
|
+
if (holder->destroyed)
|
69
|
+
return;
|
70
|
+
|
71
|
+
rbgobj_instance_call_cinfo_mark(holder->gobj);
|
72
|
+
g_hash_table_foreach(holder->rb_relatives, holder_relatives_mark, NULL);
|
59
73
|
}
|
60
74
|
|
61
75
|
static void
|
@@ -91,6 +105,59 @@ static const rb_data_type_t rg_glib_object_type = {
|
|
91
105
|
RUBY_TYPED_FREE_IMMEDIATELY,
|
92
106
|
};
|
93
107
|
|
108
|
+
void
|
109
|
+
rbgobj_object_add_relative(VALUE rb_gobject, VALUE rb_relative)
|
110
|
+
{
|
111
|
+
gobj_holder *holder;
|
112
|
+
TypedData_Get_Struct(rb_gobject,
|
113
|
+
gobj_holder,
|
114
|
+
&rg_glib_object_type,
|
115
|
+
holder);
|
116
|
+
if (holder->rb_relatives) {
|
117
|
+
g_hash_table_insert(holder->rb_relatives,
|
118
|
+
(gpointer)(rb_relative),
|
119
|
+
(gpointer)(rb_relative));
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
void
|
124
|
+
rbgobj_object_remove_relative(VALUE rb_gobject, VALUE rb_relative)
|
125
|
+
{
|
126
|
+
gobj_holder *holder;
|
127
|
+
TypedData_Get_Struct(rb_gobject,
|
128
|
+
gobj_holder,
|
129
|
+
&rg_glib_object_type,
|
130
|
+
holder);
|
131
|
+
if (holder->rb_relatives) {
|
132
|
+
g_hash_table_remove(holder->rb_relatives,
|
133
|
+
(gpointer)(rb_relative));
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
static gboolean
|
138
|
+
rbgobj_object_remove_relatives_body(gpointer key,
|
139
|
+
gpointer value,
|
140
|
+
gpointer user_data)
|
141
|
+
{
|
142
|
+
VALUE rb_relative = (VALUE)value;
|
143
|
+
VALUE rb_relative_class = (VALUE)user_data;
|
144
|
+
|
145
|
+
return RVAL2CBOOL(rb_obj_is_kind_of(rb_relative, rb_relative_class));
|
146
|
+
}
|
147
|
+
|
148
|
+
void
|
149
|
+
rbgobj_object_remove_relatives(VALUE rb_gobject, VALUE rb_relative_class)
|
150
|
+
{
|
151
|
+
gobj_holder *holder;
|
152
|
+
TypedData_Get_Struct(rb_gobject,
|
153
|
+
gobj_holder,
|
154
|
+
&rg_glib_object_type,
|
155
|
+
holder);
|
156
|
+
g_hash_table_foreach_remove(holder->rb_relatives,
|
157
|
+
rbgobj_object_remove_relatives_body,
|
158
|
+
(gpointer)(rb_relative_class));
|
159
|
+
}
|
160
|
+
|
94
161
|
VALUE
|
95
162
|
rbgobj_object_alloc_func(VALUE klass)
|
96
163
|
{
|
@@ -105,6 +172,7 @@ rbgobj_object_alloc_func(VALUE klass)
|
|
105
172
|
holder->gobj = NULL;
|
106
173
|
holder->cinfo = NULL;
|
107
174
|
holder->destroyed = FALSE;
|
175
|
+
holder->rb_relatives = g_hash_table_new(g_direct_hash, g_direct_equal);
|
108
176
|
|
109
177
|
return result;
|
110
178
|
}
|
@@ -686,13 +754,6 @@ static void
|
|
686
754
|
rg_destroy_bind_property_full_data(gpointer user_data)
|
687
755
|
{
|
688
756
|
RGBindPropertyCallbackData *data = (RGBindPropertyCallbackData *)user_data;
|
689
|
-
|
690
|
-
if (!NIL_P(data->transform_to_callback))
|
691
|
-
G_CHILD_REMOVE(data->self, data->transform_to_callback);
|
692
|
-
|
693
|
-
if (!NIL_P(data->transform_from_callback))
|
694
|
-
G_CHILD_REMOVE(data->self, data->transform_from_callback);
|
695
|
-
|
696
757
|
xfree(data);
|
697
758
|
}
|
698
759
|
|
@@ -715,6 +776,7 @@ rg_bind_property(gint argc, VALUE *argv, VALUE self)
|
|
715
776
|
GBinding *binding;
|
716
777
|
GBindingTransformFunc transform_to = NULL;
|
717
778
|
GBindingTransformFunc transform_from = NULL;
|
779
|
+
VALUE rb_binding;
|
718
780
|
|
719
781
|
rb_scan_args(argc, argv, "41", &rb_source_property, &rb_target,
|
720
782
|
&rb_target_property, &rb_flags, &rb_options);
|
@@ -731,18 +793,16 @@ rg_bind_property(gint argc, VALUE *argv, VALUE self)
|
|
731
793
|
flags = RVAL2GBINDINGFLAGS(rb_flags);
|
732
794
|
|
733
795
|
if (!NIL_P(rb_transform_to)) {
|
734
|
-
G_CHILD_ADD(self, rb_transform_to);
|
735
796
|
transform_to = rg_bind_property_transform_to_callback;
|
736
797
|
}
|
737
798
|
|
738
799
|
if (!NIL_P(rb_transform_from)) {
|
739
|
-
G_CHILD_ADD(self, rb_transform_from);
|
740
800
|
transform_from = rg_bind_property_transform_from_callback;
|
741
801
|
}
|
742
802
|
|
743
803
|
if (transform_to || transform_from) {
|
744
804
|
RGBindPropertyCallbackData *data;
|
745
|
-
data = (RGBindPropertyCallbackData
|
805
|
+
data = RB_ALLOC(RGBindPropertyCallbackData);
|
746
806
|
data->self = self;
|
747
807
|
data->transform_to_callback = rb_transform_to;
|
748
808
|
data->transform_from_callback = rb_transform_from;
|
@@ -752,13 +812,21 @@ rg_bind_property(gint argc, VALUE *argv, VALUE self)
|
|
752
812
|
transform_from,
|
753
813
|
(gpointer)data,
|
754
814
|
rg_destroy_bind_property_full_data);
|
815
|
+
rb_binding = GOBJ2RVAL(binding);
|
816
|
+
if (!NIL_P(rb_transform_to)) {
|
817
|
+
rbgobj_object_add_relative(rb_binding, rb_transform_to);
|
818
|
+
}
|
819
|
+
if (!NIL_P(rb_transform_from)) {
|
820
|
+
rbgobj_object_add_relative(rb_binding, rb_transform_from);
|
821
|
+
}
|
755
822
|
} else {
|
756
823
|
binding = g_object_bind_property(source, source_property,
|
757
824
|
target, target_property,
|
758
825
|
flags);
|
826
|
+
rb_binding = GOBJ2RVAL(binding);
|
759
827
|
}
|
760
828
|
|
761
|
-
return
|
829
|
+
return rb_binding;
|
762
830
|
}
|
763
831
|
#endif
|
764
832
|
|
data/ext/glib2/rbgobject.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2011-2018 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2003-2006 Ruby-GNOME2 Project Team
|
5
5
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
6
6
|
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
@@ -183,16 +183,25 @@ rbgobj_ruby_object_from_instance_with_unref(gpointer instance)
|
|
183
183
|
void
|
184
184
|
rbgobj_add_relative(VALUE obj, VALUE relative)
|
185
185
|
{
|
186
|
-
VALUE
|
186
|
+
static VALUE mGLibObject = Qnil;
|
187
|
+
if (NIL_P(mGLibObject)) {
|
188
|
+
mGLibObject = rb_const_get(mGLib, rb_intern("Object"));
|
189
|
+
}
|
187
190
|
|
188
|
-
if (
|
189
|
-
|
191
|
+
if (rb_obj_is_kind_of(obj, mGLibObject)) {
|
192
|
+
rbgobj_object_add_relative(obj, relative);
|
193
|
+
} else {
|
194
|
+
VALUE hash = Qnil;
|
190
195
|
|
191
|
-
|
192
|
-
|
193
|
-
|
196
|
+
if (RVAL2CBOOL(rb_ivar_defined(obj, id_relatives)))
|
197
|
+
hash = rb_ivar_get(obj, id_relatives);
|
198
|
+
|
199
|
+
if (NIL_P(hash) || TYPE(hash) != RUBY_T_HASH) {
|
200
|
+
hash = rb_hash_new();
|
201
|
+
rb_ivar_set(obj, id_relatives, hash);
|
202
|
+
}
|
203
|
+
rb_hash_aset(hash, relative, Qnil);
|
194
204
|
}
|
195
|
-
rb_hash_aset(hash, relative, Qnil);
|
196
205
|
}
|
197
206
|
|
198
207
|
void
|
@@ -207,16 +216,26 @@ rbgobj_invalidate_relatives(VALUE obj)
|
|
207
216
|
void
|
208
217
|
rbgobj_add_relative_removable(VALUE obj, VALUE relative, ID obj_ivar_id, VALUE hash_key)
|
209
218
|
{
|
210
|
-
VALUE
|
219
|
+
static VALUE cGLibObject = Qnil;
|
220
|
+
if (NIL_P(cGLibObject)) {
|
221
|
+
cGLibObject = rb_const_get(mGLib, rb_intern("Object"));
|
222
|
+
}
|
211
223
|
|
212
|
-
if (
|
213
|
-
|
224
|
+
if (obj_ivar_id == rbgobj_id_children &&
|
225
|
+
rb_obj_is_kind_of(obj, cGLibObject)) {
|
226
|
+
rbgobj_object_add_relative(obj, hash_key);
|
227
|
+
} else {
|
228
|
+
VALUE hash = Qnil;
|
214
229
|
|
215
|
-
|
216
|
-
|
217
|
-
|
230
|
+
if (RVAL2CBOOL(rb_ivar_defined(obj, obj_ivar_id)))
|
231
|
+
hash = rb_ivar_get(obj, obj_ivar_id);
|
232
|
+
|
233
|
+
if (NIL_P(hash) || TYPE(hash) != RUBY_T_HASH) {
|
234
|
+
hash = rb_hash_new();
|
235
|
+
rb_ivar_set(obj, obj_ivar_id, hash);
|
236
|
+
}
|
237
|
+
rb_hash_aset(hash, hash_key, relative);
|
218
238
|
}
|
219
|
-
rb_hash_aset(hash, hash_key, relative);
|
220
239
|
}
|
221
240
|
|
222
241
|
VALUE
|
@@ -236,15 +255,25 @@ rbgobj_get_relative_removable(VALUE obj, ID obj_ivar_id, VALUE hash_key)
|
|
236
255
|
void
|
237
256
|
rbgobj_remove_relative(VALUE obj, ID obj_ivar_id, VALUE hash_key)
|
238
257
|
{
|
239
|
-
VALUE
|
240
|
-
|
241
|
-
|
242
|
-
|
258
|
+
static VALUE cGLibObject = Qnil;
|
259
|
+
if (NIL_P(cGLibObject)) {
|
260
|
+
cGLibObject = rb_const_get(mGLib, rb_intern("Object"));
|
261
|
+
}
|
243
262
|
|
244
|
-
if (
|
245
|
-
|
263
|
+
if ((obj_ivar_id == id_relatives || obj_ivar_id == rbgobj_id_children) &&
|
264
|
+
rb_obj_is_kind_of(obj, cGLibObject)) {
|
265
|
+
rbgobj_object_remove_relative(obj, hash_key);
|
246
266
|
} else {
|
247
|
-
|
267
|
+
VALUE hash = Qnil;
|
268
|
+
|
269
|
+
if (RVAL2CBOOL(rb_ivar_defined(obj, obj_ivar_id)))
|
270
|
+
hash = rb_ivar_get(obj, obj_ivar_id);
|
271
|
+
|
272
|
+
if (NIL_P(hash) || TYPE(hash) != RUBY_T_HASH) {
|
273
|
+
/* should not happen. */
|
274
|
+
} else {
|
275
|
+
rb_funcall(hash, id_delete, 1, hash_key);
|
276
|
+
}
|
248
277
|
}
|
249
278
|
}
|
250
279
|
|
data/ext/glib2/rbgobject.h
CHANGED
@@ -79,6 +79,7 @@ RUBY_GLIB2_VAR ID rbgobj_id_children;
|
|
79
79
|
(rbgobj_add_relative_removable(self, Qnil, rbgobj_id_children, child))
|
80
80
|
#define G_CHILD_REMOVE(self, child) \
|
81
81
|
(rbgobj_remove_relative(self, rbgobj_id_children, child))
|
82
|
+
/* Deprecated since 3.2.5. Use rbobj_object_remove_relatives() instead. */
|
82
83
|
#define G_CHILD_REMOVE_ALL(self) \
|
83
84
|
(rbgobj_remove_relative_all(self, rbgobj_id_children))
|
84
85
|
|
@@ -147,6 +148,13 @@ extern VALUE rbgobj_ruby_object_from_instance2(gpointer instance, gboolean alloc
|
|
147
148
|
extern VALUE rbgobj_ruby_object_from_instance_with_unref(gpointer instance);
|
148
149
|
extern void rbgobj_instance_unref(gpointer instance);
|
149
150
|
|
151
|
+
extern void rbgobj_object_add_relative(VALUE rb_gobject,
|
152
|
+
VALUE rb_relative);
|
153
|
+
extern void rbgobj_object_remove_relative(VALUE rb_gobject,
|
154
|
+
VALUE rb_relative);
|
155
|
+
extern void rbgobj_object_remove_relatives(VALUE rb_gobject,
|
156
|
+
VALUE rb_relative_class);
|
157
|
+
|
150
158
|
extern void rbgobj_add_relative(VALUE obj, VALUE relative);
|
151
159
|
extern void rbgobj_invalidate_relatives(VALUE obj);
|
152
160
|
extern void rbgobj_add_relative_removable(VALUE obj, VALUE relative,
|
data/ext/glib2/rbgprivate.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2007-
|
3
|
+
* Copyright (C) 2007-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
|
@@ -42,6 +42,7 @@ typedef struct {
|
|
42
42
|
GObject* gobj;
|
43
43
|
const RGObjClassInfo* cinfo;
|
44
44
|
gboolean destroyed;
|
45
|
+
GHashTable *rb_relatives;
|
45
46
|
} gobj_holder;
|
46
47
|
|
47
48
|
typedef struct {
|
data/lib/2.2/glib2.so
CHANGED
Binary file
|
data/lib/2.3/glib2.so
CHANGED
Binary file
|
data/lib/2.4/glib2.so
CHANGED
Binary file
|
data/lib/2.5/glib2.so
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/vendor/local/bin/gdbus.exe
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/vendor/local/bin/gio.exe
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/vendor/local/bin/iconv.exe
CHANGED
Binary file
|
data/vendor/local/bin/idn2.exe
CHANGED
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
|
data/vendor/local/bin/trust.exe
CHANGED
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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pkg-config
|