glib2 4.1.4 → 4.1.6

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
2
  SHA256:
3
- metadata.gz: 730c92d713ab0829f6d4d2bd1e53649b708dcaa1589067780696e6a0198b7872
4
- data.tar.gz: 4c7cb6254e75739807abbf7adde871340ce316417290a24b25a18b41acf58f9c
3
+ metadata.gz: 5331e6475207502d9e0a2566b7728c09fd95ac83d821b62ea247406bfb47c789
4
+ data.tar.gz: 7ff90ee993333fdd7b4375d0b29665d4f96219442e3bf487483d80874d70378e
5
5
  SHA512:
6
- metadata.gz: 1adb4c2fc1acfec8675218663147546ddf29677c6101435ac3f3688b01c10fea6f5d2ac79a537c8529bd5de787ce2d1f77f2e48263d8771d432eec1ea125696c
7
- data.tar.gz: a1538691d4b3bd96975b4abc4f27bac33a31103945df413d6a3b91a6b912d426a8466f94ebaac7f1deb069e28bb2b959f1ed853e4ac8d1a6c833fee0c6afed45
6
+ metadata.gz: a40c45a76f008b275952f8d10804cc492849c498ee7e2ee2be60d70e22490ecb4051073d83a1435d176fcfea7df45885c80ba45443511aa45191b784bdbdaf3c
7
+ data.tar.gz: f1ffa68a21cb316a092b43deb23b6cd9a851bdd6a56208875c4fc98b31cacf4572f329cf2635b5b596ab024a72910ef48b0e9419343b2a162932a53f6bf4634e
data/ext/glib2/extconf.rb CHANGED
@@ -67,6 +67,7 @@ include_paths = PKGConfig.cflags_only_I("glib-2.0")
67
67
  ignore_headers = [
68
68
  "giochannel.h",
69
69
  "gmain.h",
70
+ "gmodule.h",
70
71
  "gscanner.h",
71
72
  ]
72
73
  unless windows_platform?
data/ext/glib2/glib2.def CHANGED
@@ -63,6 +63,7 @@ EXPORTS
63
63
  rbgobj_register_type
64
64
  rbgobj_object_alloc_func
65
65
  rbgobj_object_add_relative
66
+ rbgobj_gobject_remove_relative
66
67
  rbgobj_object_remove_relative
67
68
  rbgobj_object_remove_relatives
68
69
  rbgobj_set_signal_func
data/ext/glib2/rbglib.h CHANGED
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
33
33
 
34
34
  #define RBGLIB_MAJOR_VERSION 4
35
35
  #define RBGLIB_MINOR_VERSION 1
36
- #define RBGLIB_MICRO_VERSION 4
36
+ #define RBGLIB_MICRO_VERSION 6
37
37
 
38
38
  #ifndef RB_ZALLOC
39
39
  # ifdef ZALLOC
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2002-2022 Ruby-GNOME Project Team
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, id_closures;
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
- rbgobj_add_relative_removable(object,
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, id_closures, rclosure->rb_holder);
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
  }
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2002-2022 Ruby-GNOME Project Team
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
 
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2003-2022 Ruby-GNOME Project Team
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
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-04 00:00:00.000000000 Z
11
+ date: 2023-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pkg-config