glib2 4.1.5 → 4.1.7

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: 66272eed88affb94e6450b2c6fc3e709170550c8128f655c7a04525ce500c1e2
4
- data.tar.gz: 3bf5c4b58db2710958f944a19c64a241533782a3426750c1730f0b698d2299cb
3
+ metadata.gz: 4b418a07a02ac4a347a97c51aa7bd720ae270fe2b2e4570240b630347dce236f
4
+ data.tar.gz: 6e09ba006758b60901ef0a11090683a3049985fa0427bf35e8c33419401ff039
5
5
  SHA512:
6
- metadata.gz: f2cc24a9b32995fe0b103b791fd8125440e57f4df461223d18a6ea78455b8636bbb85dde69fbd369e066eead8512883e102b2161aef19aa63be2837fe6ba8ee2
7
- data.tar.gz: 75752d24af34f8e581881a7174d4396b8da667a899e70a3af069fef6d8729fc3e87faa10b633511a58c461f3a2653761932eb528b21f1e7a65db223573df1e11
6
+ metadata.gz: e9daf24c2d74c02169946f3442fe1c6c748ca5a9faa12dd3e90f5e88cc71536678efaf15fb81a8f6b092b0d8c238b6a517b18fbfd727b71b41b299b357be845c
7
+ data.tar.gz: 8c598058d9deee04c344388ae2370d2ab5d2b35afc6fe029bf7cb583e5e92a44fd895d67a1348c7955ebc10d7683e39812e3379a24bed67421e950e3bfb8881a
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
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2015-2022 Ruby-GNOME Project Team
3
+ * Copyright (C) 2015-2023 Ruby-GNOME 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
@@ -115,7 +115,9 @@ static const rb_data_type_t rbg_variant_type = {
115
115
  },
116
116
  NULL,
117
117
  NULL,
118
- RUBY_TYPED_FREE_IMMEDIATELY,
118
+ RUBY_TYPED_FREE_IMMEDIATELY |
119
+ RUBY_TYPED_WB_PROTECTED |
120
+ RUBY_TYPED_FROZEN_SHAREABLE,
119
121
  };
120
122
 
121
123
  static VALUE
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 5
36
+ #define RBGLIB_MICRO_VERSION 7
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;
@@ -217,7 +217,9 @@ static const rb_data_type_t rbg_closure_holder_type = {
217
217
  },
218
218
  NULL,
219
219
  NULL,
220
- RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE,
220
+ RUBY_TYPED_FREE_IMMEDIATELY |
221
+ RUBY_TYPED_WB_PROTECTED |
222
+ RUBY_TYPED_FROZEN_SHAREABLE,
221
223
  };
222
224
 
223
225
  static GClosure *
@@ -279,10 +281,7 @@ void
279
281
  g_rclosure_attach(GClosure *closure, VALUE object)
280
282
  {
281
283
  GRClosure *rclosure = (GRClosure *)closure;
282
- rbgobj_add_relative_removable(object,
283
- Qnil,
284
- id_closures,
285
- rclosure->rb_holder);
284
+ rbgobj_add_relative(object, rclosure->rb_holder);
286
285
  }
287
286
 
288
287
  void
@@ -297,11 +296,18 @@ g_rclosure_attach_gobject(GClosure *closure, VALUE object)
297
296
  rclosure->objects = g_list_prepend(rclosure->objects, gobject);
298
297
  }
299
298
 
299
+ static void
300
+ g_rclosure_detach_raw_gobject(GClosure *closure, GObject *gobject)
301
+ {
302
+ GRClosure *rclosure = (GRClosure *)closure;
303
+ rbgobj_gobject_remove_relative(gobject, rclosure->rb_holder);
304
+ }
305
+
300
306
  void
301
307
  g_rclosure_detach(GClosure *closure, VALUE object)
302
308
  {
303
309
  GRClosure *rclosure = (GRClosure *)closure;
304
- rbgobj_remove_relative(object, id_closures, rclosure->rb_holder);
310
+ rbgobj_remove_relative(object, 0, rclosure->rb_holder);
305
311
  }
306
312
 
307
313
  void
@@ -338,7 +344,6 @@ static void
338
344
  init_rclosure(void)
339
345
  {
340
346
  id_call = rb_intern("call");
341
- id_closures = rb_intern("closures");
342
347
  rclosure_initialized = TRUE;
343
348
  rb_set_end_proc(rclosure_end_proc, Qnil);
344
349
  }
@@ -114,7 +114,9 @@ static const rb_data_type_t rg_glib_enum_type = {
114
114
  },
115
115
  NULL,
116
116
  NULL,
117
- RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE,
117
+ RUBY_TYPED_FREE_IMMEDIATELY |
118
+ RUBY_TYPED_WB_PROTECTED |
119
+ RUBY_TYPED_FROZEN_SHAREABLE,
118
120
  };
119
121
 
120
122
  static enum_holder *
@@ -83,7 +83,9 @@ static const rb_data_type_t rg_glib_flags_type = {
83
83
  },
84
84
  NULL,
85
85
  NULL,
86
- RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE,
86
+ RUBY_TYPED_FREE_IMMEDIATELY |
87
+ RUBY_TYPED_WB_PROTECTED |
88
+ RUBY_TYPED_FROZEN_SHAREABLE,
87
89
  };
88
90
 
89
91
  static flags_holder*
@@ -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
 
@@ -37,7 +37,9 @@ static const rb_data_type_t rg_glib_signal_type = {
37
37
  },
38
38
  NULL,
39
39
  NULL,
40
- RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE,
40
+ RUBY_TYPED_FREE_IMMEDIATELY |
41
+ RUBY_TYPED_WB_PROTECTED |
42
+ RUBY_TYPED_FROZEN_SHAREABLE,
41
43
  };
42
44
 
43
45
  static VALUE
@@ -30,7 +30,9 @@ static const rb_data_type_t rbg_pointer_type = {
30
30
  },
31
31
  NULL,
32
32
  NULL,
33
- RUBY_TYPED_FREE_IMMEDIATELY,
33
+ RUBY_TYPED_FREE_IMMEDIATELY |
34
+ RUBY_TYPED_WB_PROTECTED |
35
+ RUBY_TYPED_FROZEN_SHAREABLE,
34
36
  };
35
37
 
36
38
  VALUE
@@ -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,
data/lib/mkmf-gnome.rb CHANGED
@@ -431,7 +431,7 @@ def glib_mkenums(prefix, files, g_type_prefix, include_files, options={})
431
431
  end
432
432
 
433
433
  def check_cairo(options={})
434
- rcairo_source_dir = options[:rcairo_source_dir]
434
+ rcairo_source_dir = options[:rcairo_source_dir] || ENV["RCAIRO_SOURCE_DIR"]
435
435
  if rcairo_source_dir.nil?
436
436
  rcairo_source_base_dir = "rcairo"
437
437
  top_dir = options[:top_dir]
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.5
4
+ version: 4.1.7
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-10 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pkg-config