glib2 4.1.4 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/glib2/extconf.rb +3 -1
- data/ext/glib2/glib2.def +1 -0
- data/ext/glib2/rbglib-variant.c +4 -2
- data/ext/glib2/rbglib.h +2 -2
- data/ext/glib2/rbgobj_closure.c +18 -13
- data/ext/glib2/rbgobj_enums.c +3 -1
- data/ext/glib2/rbgobj_flags.c +3 -1
- data/ext/glib2/rbgobj_object.c +11 -3
- data/ext/glib2/rbgobj_signal.c +3 -1
- data/ext/glib2/rbgobj_valuetypes.c +3 -1
- data/ext/glib2/rbgobject.h +3 -1
- data/lib/mkmf-gnome.rb +1 -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: 1812eb3cf06d40dd8f6782704af94ae8bba43272e89d40f0775ab90f40977824
|
4
|
+
data.tar.gz: 7c03f2c56640a2a17a6bdf7dbd74a83aa334105ad64be07dd6ee0dd2bd10aa49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ab840f415951e0b3504c8c3f33f265d2908c9a6fcaf9a810490290e3bcb06f5baed4a241e51beb3052e0cd882a46948dbbd59d3119479721df47be1eecfbf73
|
7
|
+
data.tar.gz: db5476956273f53e9e12d476b9a1c9718a809c27743a32992a7c4a43110fa9910bd7729716ca28a6c76101cbe8a84c5a39e2275c10fd836eeeaf522733cc44ce
|
data/ext/glib2/extconf.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2002-
|
1
|
+
# Copyright (C) 2002-2023 Ruby-GNOME 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
|
@@ -29,6 +29,7 @@ require "mkmf-gnome"
|
|
29
29
|
unless required_pkg_config_package([package_id, 2, 12, 0],
|
30
30
|
:alt_linux => "glib2-devel",
|
31
31
|
:arch_linux => "glib2",
|
32
|
+
:conda => "glib",
|
32
33
|
:debian => "libglib2.0-dev",
|
33
34
|
:gentoo_linux => "dev-libs/glib",
|
34
35
|
:homebrew => "glib",
|
@@ -67,6 +68,7 @@ include_paths = PKGConfig.cflags_only_I("glib-2.0")
|
|
67
68
|
ignore_headers = [
|
68
69
|
"giochannel.h",
|
69
70
|
"gmain.h",
|
71
|
+
"gmodule.h",
|
70
72
|
"gscanner.h",
|
71
73
|
]
|
72
74
|
unless windows_platform?
|
data/ext/glib2/glib2.def
CHANGED
data/ext/glib2/rbglib-variant.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2015-
|
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
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;
|
@@ -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 |
|
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
|
-
|
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,
|
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
|
}
|
data/ext/glib2/rbgobj_enums.c
CHANGED
@@ -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 |
|
117
|
+
RUBY_TYPED_FREE_IMMEDIATELY |
|
118
|
+
RUBY_TYPED_WB_PROTECTED |
|
119
|
+
RUBY_TYPED_FROZEN_SHAREABLE,
|
118
120
|
};
|
119
121
|
|
120
122
|
static enum_holder *
|
data/ext/glib2/rbgobj_flags.c
CHANGED
@@ -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 |
|
86
|
+
RUBY_TYPED_FREE_IMMEDIATELY |
|
87
|
+
RUBY_TYPED_WB_PROTECTED |
|
88
|
+
RUBY_TYPED_FROZEN_SHAREABLE,
|
87
89
|
};
|
88
90
|
|
89
91
|
static flags_holder*
|
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/rbgobj_signal.c
CHANGED
@@ -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 |
|
40
|
+
RUBY_TYPED_FREE_IMMEDIATELY |
|
41
|
+
RUBY_TYPED_WB_PROTECTED |
|
42
|
+
RUBY_TYPED_FROZEN_SHAREABLE,
|
41
43
|
};
|
42
44
|
|
43
45
|
static VALUE
|
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,
|
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.
|
4
|
+
version: 4.2.0
|
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-
|
11
|
+
date: 2023-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pkg-config
|