glib2 4.1.5 → 4.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/glib2/glib2.def +1 -0
- data/ext/glib2/rbglib.h +1 -1
- data/ext/glib2/rbgobj_closure.c +15 -12
- data/ext/glib2/rbgobj_object.c +11 -3
- data/ext/glib2/rbgobject.h +3 -1
- 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: 5331e6475207502d9e0a2566b7728c09fd95ac83d821b62ea247406bfb47c789
|
4
|
+
data.tar.gz: 7ff90ee993333fdd7b4375d0b29665d4f96219442e3bf487483d80874d70378e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a40c45a76f008b275952f8d10804cc492849c498ee7e2ee2be60d70e22490ecb4051073d83a1435d176fcfea7df45885c80ba45443511aa45191b784bdbdaf3c
|
7
|
+
data.tar.gz: f1ffa68a21cb316a092b43deb23b6cd9a851bdd6a56208875c4fc98b31cacf4572f329cf2635b5b596ab024a72910ef48b0e9419343b2a162932a53f6bf4634e
|
data/ext/glib2/glib2.def
CHANGED
data/ext/glib2/rbglib.h
CHANGED
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) 2002-
|
3
|
+
* Copyright (C) 2002-2023 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
#define RG_TARGET_NAMESPACE cClosure
|
25
25
|
|
26
|
-
static ID id_call
|
26
|
+
static ID id_call;
|
27
27
|
static gboolean rclosure_initialized = FALSE;
|
28
28
|
|
29
29
|
#define TAG_SIZE 64
|
@@ -155,6 +155,7 @@ rclosure_marshal(GClosure* closure,
|
|
155
155
|
G_PROTECT_CALLBACK(rclosure_marshal_do, &arg);
|
156
156
|
}
|
157
157
|
|
158
|
+
static void g_rclosure_detach_raw_gobject(GClosure *closure, GObject *gobject);
|
158
159
|
static void rclosure_weak_notify(gpointer data, GObject* where_the_object_was);
|
159
160
|
|
160
161
|
static void
|
@@ -165,12 +166,11 @@ rclosure_invalidate(G_GNUC_UNUSED gpointer data, GClosure *closure)
|
|
165
166
|
GList *next;
|
166
167
|
for (next = rclosure->objects; next; next = next->next) {
|
167
168
|
GObject *object = G_OBJECT(next->data);
|
169
|
+
if (!NIL_P(rclosure->rb_holder)) {
|
170
|
+
g_rclosure_detach_raw_gobject(closure, object);
|
171
|
+
}
|
168
172
|
g_object_weak_unref(object, rclosure_weak_notify, rclosure);
|
169
173
|
g_closure_unref(closure);
|
170
|
-
VALUE obj = rbgobj_ruby_object_from_instance2(object, FALSE);
|
171
|
-
if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj)) {
|
172
|
-
rbgobj_object_remove_relative(obj, rclosure->rb_holder);
|
173
|
-
}
|
174
174
|
}
|
175
175
|
g_list_free(rclosure->objects);
|
176
176
|
rclosure->objects = NULL;
|
@@ -279,10 +279,7 @@ void
|
|
279
279
|
g_rclosure_attach(GClosure *closure, VALUE object)
|
280
280
|
{
|
281
281
|
GRClosure *rclosure = (GRClosure *)closure;
|
282
|
-
|
283
|
-
Qnil,
|
284
|
-
id_closures,
|
285
|
-
rclosure->rb_holder);
|
282
|
+
rbgobj_add_relative(object, rclosure->rb_holder);
|
286
283
|
}
|
287
284
|
|
288
285
|
void
|
@@ -297,11 +294,18 @@ g_rclosure_attach_gobject(GClosure *closure, VALUE object)
|
|
297
294
|
rclosure->objects = g_list_prepend(rclosure->objects, gobject);
|
298
295
|
}
|
299
296
|
|
297
|
+
static void
|
298
|
+
g_rclosure_detach_raw_gobject(GClosure *closure, GObject *gobject)
|
299
|
+
{
|
300
|
+
GRClosure *rclosure = (GRClosure *)closure;
|
301
|
+
rbgobj_gobject_remove_relative(gobject, rclosure->rb_holder);
|
302
|
+
}
|
303
|
+
|
300
304
|
void
|
301
305
|
g_rclosure_detach(GClosure *closure, VALUE object)
|
302
306
|
{
|
303
307
|
GRClosure *rclosure = (GRClosure *)closure;
|
304
|
-
rbgobj_remove_relative(object,
|
308
|
+
rbgobj_remove_relative(object, 0, rclosure->rb_holder);
|
305
309
|
}
|
306
310
|
|
307
311
|
void
|
@@ -338,7 +342,6 @@ static void
|
|
338
342
|
init_rclosure(void)
|
339
343
|
{
|
340
344
|
id_call = rb_intern("call");
|
341
|
-
id_closures = rb_intern("closures");
|
342
345
|
rclosure_initialized = TRUE;
|
343
346
|
rb_set_end_proc(rclosure_end_proc, Qnil);
|
344
347
|
}
|
data/ext/glib2/rbgobj_object.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2002-
|
3
|
+
* Copyright (C) 2002-2023 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002-2003 Masahiro Sakai
|
5
5
|
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
6
6
|
* Daisuke Kanda,
|
@@ -132,6 +132,15 @@ rbgobj_object_add_relative(VALUE rb_gobject, VALUE rb_relative)
|
|
132
132
|
}
|
133
133
|
}
|
134
134
|
|
135
|
+
void
|
136
|
+
rbgobj_gobject_remove_relative(GObject *gobject, VALUE rb_relative)
|
137
|
+
{
|
138
|
+
gobj_holder *holder = g_object_get_qdata(gobject, RUBY_GOBJECT_OBJ_KEY);
|
139
|
+
if (holder && holder->rb_relatives) {
|
140
|
+
g_hash_table_remove(holder->rb_relatives, (gpointer)(rb_relative));
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
135
144
|
void
|
136
145
|
rbgobj_object_remove_relative(VALUE rb_gobject, VALUE rb_relative)
|
137
146
|
{
|
@@ -141,8 +150,7 @@ rbgobj_object_remove_relative(VALUE rb_gobject, VALUE rb_relative)
|
|
141
150
|
&rg_glib_object_type,
|
142
151
|
holder);
|
143
152
|
if (holder->rb_relatives) {
|
144
|
-
g_hash_table_remove(holder->rb_relatives,
|
145
|
-
(gpointer)(rb_relative));
|
153
|
+
g_hash_table_remove(holder->rb_relatives, (gpointer)(rb_relative));
|
146
154
|
}
|
147
155
|
}
|
148
156
|
|
data/ext/glib2/rbgobject.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2023 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -146,6 +146,8 @@ extern void rbgobj_instance_unref(gpointer instance);
|
|
146
146
|
|
147
147
|
extern void rbgobj_object_add_relative(VALUE rb_gobject,
|
148
148
|
VALUE rb_relative);
|
149
|
+
extern void rbgobj_gobject_remove_relative(GObject *gobject,
|
150
|
+
VALUE rb_relative);
|
149
151
|
extern void rbgobj_object_remove_relative(VALUE rb_gobject,
|
150
152
|
VALUE rb_relative);
|
151
153
|
extern void rbgobj_object_remove_relatives(VALUE rb_gobject,
|
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: 4.1.
|
4
|
+
version: 4.1.6
|
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: 2023-05-
|
11
|
+
date: 2023-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pkg-config
|