glib2 3.3.9 → 3.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/Rakefile +6 -4
- data/ext/glib2/extconf.rb +1 -5
- data/ext/glib2/rbglib-bytes.c +1 -5
- data/ext/glib2/rbglib-gc.c +98 -52
- data/ext/glib2/rbglib-variant-type.c +1 -5
- data/ext/glib2/rbglib-variant.c +3 -5
- data/ext/glib2/rbglib.c +4 -0
- data/ext/glib2/rbglib.h +7 -4
- data/ext/glib2/rbglib_bookmarkfile.c +4 -4
- data/ext/glib2/rbglib_datetime.c +1 -5
- data/ext/glib2/rbglib_fileutils.c +1 -17
- data/ext/glib2/rbglib_iochannel.c +4 -4
- data/ext/glib2/rbglib_keyfile.c +16 -41
- data/ext/glib2/rbglib_maincontext.c +6 -32
- data/ext/glib2/rbglib_mainloop.c +2 -17
- data/ext/glib2/rbglib_matchinfo.c +1 -5
- data/ext/glib2/rbglib_pollfd.c +1 -25
- data/ext/glib2/rbglib_regex.c +1 -13
- data/ext/glib2/rbglib_source.c +1 -39
- data/ext/glib2/rbglib_spawn.c +5 -10
- data/ext/glib2/rbglib_spawnerror.c +2 -2
- data/ext/glib2/rbglib_threads.c +2 -15
- data/ext/glib2/rbglib_timezone.c +1 -5
- data/ext/glib2/rbglib_unichar.c +46 -5
- data/ext/glib2/rbglib_unicode.c +1 -18
- data/ext/glib2/rbglib_utils.c +1 -14
- data/ext/glib2/rbglib_win32.c +3 -7
- data/ext/glib2/rbgobj_binding.c +1 -7
- data/ext/glib2/rbgobj_closure.c +22 -9
- data/ext/glib2/rbgobj_object.c +113 -104
- data/ext/glib2/rbgobj_param.c +2 -8
- data/ext/glib2/rbgobj_paramspecs.c +6 -24
- data/ext/glib2/rbgobj_signal.c +81 -48
- data/ext/glib2/rbgobj_strv.c +2 -2
- data/ext/glib2/rbgobj_type.c +58 -68
- data/ext/glib2/rbgobj_value.c +3 -7
- data/ext/glib2/rbgobj_valuetypes.c +14 -62
- data/ext/glib2/rbgobject.c +4 -6
- data/ext/glib2/rbgobject.h +2 -27
- data/ext/glib2/rbgprivate.h +6 -6
- data/ext/glib2/rbgutil_callback.c +23 -26
- data/lib/glib2/deprecated.rb +22 -1
- data/lib/mkmf-gnome.rb +5 -5
- data/test/glib-test-utils.rb +18 -3
- data/test/run-test.rb +49 -14
- data/test/test-binding.rb +1 -11
- data/test/test-bytes.rb +1 -5
- data/test/test-date-time.rb +1 -3
- data/test/test-file-utils.rb +1 -32
- data/test/test-iochannel.rb +3 -5
- data/test/test-key-file.rb +5 -6
- data/test/test-match-info.rb +1 -5
- data/test/test-regex.rb +1 -5
- data/test/test-source.rb +1 -14
- data/test/test-spawn.rb +2 -1
- data/test/test-time-zone.rb +1 -5
- data/test/test-timeout.rb +2 -3
- data/test/test-unicode.rb +16 -12
- data/test/test-utils.rb +2 -8
- data/test/test-variant-type.rb +1 -3
- data/test/test-win32.rb +6 -6
- metadata +3 -8
- data/ext/glib2/glib-enum-types.c +0 -1233
- data/ext/glib2/glib-enum-types.h +0 -154
- data/ext/glib2/rbgobj_valuearray.c +0 -100
- data/test/glib-test-init.rb +0 -21
data/ext/glib2/rbgobj_param.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-2021 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
|
@@ -276,7 +276,7 @@ rg_value_convert(int argc, VALUE* argv, VALUE self)
|
|
276
276
|
rb_scan_args(argc, argv, "21", &src, &src_type, &strict_validation);
|
277
277
|
|
278
278
|
/* FIXME: use rb_ensure to ensure following g_value_unset() call*/
|
279
|
-
g_value_init(&src_value,
|
279
|
+
g_value_init(&src_value, rbgobj_gtype_from_ruby(src_type));
|
280
280
|
g_value_init(&dest_value, G_PARAM_SPEC_VALUE_TYPE(pspec));
|
281
281
|
|
282
282
|
rbgobj_rvalue_to_gvalue(src, &src_value);
|
@@ -344,9 +344,7 @@ param_is_flag(G_PARAM_LAX_VALIDATION)
|
|
344
344
|
param_is_flag(G_PARAM_STATIC_NAME)
|
345
345
|
param_is_flag(G_PARAM_STATIC_NICK)
|
346
346
|
param_is_flag(G_PARAM_STATIC_BLURB)
|
347
|
-
#if GLIB_CHECK_VERSION(2, 42, 0)
|
348
347
|
param_is_flag(G_PARAM_EXPLICIT_NOTIFY)
|
349
|
-
#endif
|
350
348
|
param_is_flag(G_PARAM_DEPRECATED)
|
351
349
|
|
352
350
|
/**********************************************************************/
|
@@ -376,10 +374,8 @@ Init_gobject_gparam(void)
|
|
376
374
|
INT2FIX(G_PARAM_STATIC_NICK));
|
377
375
|
rb_define_const(RG_TARGET_NAMESPACE, "STATIC_BLURB",
|
378
376
|
INT2FIX(G_PARAM_STATIC_BLURB));
|
379
|
-
#if GLIB_CHECK_VERSION(2, 42, 0)
|
380
377
|
rb_define_const(RG_TARGET_NAMESPACE, "EXPLICIT_NOTIFY",
|
381
378
|
INT2FIX(G_PARAM_EXPLICIT_NOTIFY));
|
382
|
-
#endif
|
383
379
|
rb_define_const(RG_TARGET_NAMESPACE, "DEPRECATED",
|
384
380
|
INT2FIX(G_PARAM_DEPRECATED));
|
385
381
|
rb_define_const(RG_TARGET_NAMESPACE, "MASK",
|
@@ -432,10 +428,8 @@ Init_gobject_gparam(void)
|
|
432
428
|
param_is_G_PARAM_STATIC_NICK, 0);
|
433
429
|
rbg_define_method(RG_TARGET_NAMESPACE, "static_blurb?",
|
434
430
|
param_is_G_PARAM_STATIC_BLURB, 0);
|
435
|
-
#if GLIB_CHECK_VERSION(2, 42, 0)
|
436
431
|
rbg_define_method(RG_TARGET_NAMESPACE, "explicit_notify?",
|
437
432
|
param_is_G_PARAM_EXPLICIT_NOTIFY, 0);
|
438
|
-
#endif
|
439
433
|
rbg_define_method(RG_TARGET_NAMESPACE, "deprecated?",
|
440
434
|
param_is_G_PARAM_DEPRECATED, 0);
|
441
435
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C)
|
4
|
-
* Copyright (C) 2004 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2004-2021 Ruby-GNOME Project Team
|
5
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
6
5
|
*
|
7
6
|
* This library is free software; you can redistribute it and/or
|
@@ -116,7 +115,7 @@ enum_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
|
116
115
|
VALUE enum_type, VALUE default_value, VALUE flags)
|
117
116
|
{
|
118
117
|
GParamSpec* pspec;
|
119
|
-
GType gtype =
|
118
|
+
GType gtype = rbgobj_gtype_from_ruby(enum_type);
|
120
119
|
|
121
120
|
pspec = g_param_spec_enum(StringValuePtr(name),
|
122
121
|
StringValuePtr(nick),
|
@@ -133,7 +132,7 @@ flags_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
|
133
132
|
VALUE flags_type, VALUE default_value, VALUE flags)
|
134
133
|
{
|
135
134
|
GParamSpec* pspec;
|
136
|
-
GType gtype =
|
135
|
+
GType gtype = rbgobj_gtype_from_ruby(flags_type);
|
137
136
|
|
138
137
|
pspec = g_param_spec_flags(StringValuePtr(name),
|
139
138
|
StringValuePtr(nick),
|
@@ -167,7 +166,7 @@ param_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
|
167
166
|
pspec = g_param_spec_param(StringValuePtr(name),
|
168
167
|
StringValuePtr(nick),
|
169
168
|
StringValuePtr(blurb),
|
170
|
-
|
169
|
+
rbgobj_gtype_from_ruby(param_type),
|
171
170
|
NUM2UINT(flags));
|
172
171
|
rbgobj_param_spec_initialize(self, pspec);
|
173
172
|
return Qnil;
|
@@ -181,7 +180,7 @@ boxed_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
|
181
180
|
pspec = g_param_spec_boxed(StringValuePtr(name),
|
182
181
|
StringValuePtr(nick),
|
183
182
|
StringValuePtr(blurb),
|
184
|
-
|
183
|
+
rbgobj_gtype_from_ruby(boxed_type),
|
185
184
|
NUM2UINT(flags));
|
186
185
|
rbgobj_param_spec_initialize(self, pspec);
|
187
186
|
return Qnil;
|
@@ -199,20 +198,6 @@ pointer_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb, VALUE flags)
|
|
199
198
|
return Qnil;
|
200
199
|
}
|
201
200
|
|
202
|
-
static VALUE
|
203
|
-
value_array_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
204
|
-
VALUE element_spec, VALUE flags)
|
205
|
-
{
|
206
|
-
GParamSpec* pspec;
|
207
|
-
pspec = g_param_spec_value_array(StringValuePtr(name),
|
208
|
-
StringValuePtr(nick),
|
209
|
-
StringValuePtr(blurb),
|
210
|
-
RVAL2GOBJ(element_spec),
|
211
|
-
NUM2UINT(flags));
|
212
|
-
rbgobj_param_spec_initialize(self, pspec);
|
213
|
-
return Qnil;
|
214
|
-
}
|
215
|
-
|
216
201
|
static VALUE
|
217
202
|
object_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
218
203
|
VALUE object_type, VALUE flags)
|
@@ -221,7 +206,7 @@ object_initialize(VALUE self, VALUE name, VALUE nick, VALUE blurb,
|
|
221
206
|
pspec = g_param_spec_object(StringValuePtr(name),
|
222
207
|
StringValuePtr(nick),
|
223
208
|
StringValuePtr(blurb),
|
224
|
-
|
209
|
+
rbgobj_gtype_from_ruby(object_type),
|
225
210
|
NUM2UINT(flags));
|
226
211
|
rbgobj_param_spec_initialize(self, pspec);
|
227
212
|
return Qnil;
|
@@ -303,9 +288,6 @@ Init_gobject_gparamspecs(void)
|
|
303
288
|
c = G_DEF_CLASS(G_TYPE_PARAM_POINTER, "Pointer", cParamSpec);
|
304
289
|
rbg_define_method(c, "initialize", pointer_initialize, 4);
|
305
290
|
|
306
|
-
c = G_DEF_CLASS(G_TYPE_PARAM_VALUE_ARRAY, "ValueArray", cParamSpec);
|
307
|
-
rbg_define_method(c, "initialize", value_array_initialize, 5);
|
308
|
-
|
309
291
|
c = G_DEF_CLASS(G_TYPE_PARAM_OBJECT, "Object", cParamSpec);
|
310
292
|
rbg_define_method(c, "initialize", object_initialize, 5);
|
311
293
|
}
|
data/ext/glib2/rbgobj_signal.c
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C)
|
4
|
-
* Copyright (C) 2002-2004 Ruby-GNOME Project Team
|
3
|
+
* Copyright (C) 2002-2021 Ruby-GNOME Project Team
|
5
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
6
5
|
*
|
7
6
|
* This library is free software; you can redistribute it and/or
|
@@ -64,45 +63,57 @@ rbgobj_signal_get_raw(VALUE rb_signal)
|
|
64
63
|
return query;
|
65
64
|
}
|
66
65
|
|
67
|
-
static
|
66
|
+
static GHashTable *rbg_signal_func_table;
|
67
|
+
static GMutex rbg_signal_func_table_mutex;
|
68
68
|
|
69
69
|
void
|
70
|
-
rbgobj_set_signal_func(VALUE klass,
|
70
|
+
rbgobj_set_signal_func(VALUE klass,
|
71
|
+
const gchar *signal_name,
|
72
|
+
GValToRValSignalFunc func)
|
71
73
|
{
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
guint signal_id = g_signal_lookup(signal_name, CLASS2GTYPE(klass));
|
75
|
+
g_mutex_lock(&rbg_signal_func_table_mutex);
|
76
|
+
g_hash_table_insert(rbg_signal_func_table,
|
77
|
+
GUINT_TO_POINTER(signal_id),
|
78
|
+
func);
|
79
|
+
g_mutex_unlock(&rbg_signal_func_table_mutex);
|
75
80
|
}
|
76
81
|
|
77
82
|
GValToRValSignalFunc
|
78
83
|
rbgobj_get_signal_func(guint signal_id)
|
79
84
|
{
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
85
|
+
g_mutex_lock(&rbg_signal_func_table_mutex);
|
86
|
+
GValToRValSignalFunc func =
|
87
|
+
g_hash_table_lookup(rbg_signal_func_table,
|
88
|
+
GUINT_TO_POINTER(signal_id));
|
89
|
+
g_mutex_unlock(&rbg_signal_func_table_mutex);
|
84
90
|
return func;
|
85
91
|
}
|
86
92
|
|
87
|
-
static
|
93
|
+
static GHashTable *rbg_signal_call_func_table;
|
94
|
+
static GMutex rbg_signal_call_func_table_mutex;
|
88
95
|
|
89
96
|
void
|
90
97
|
rbgobj_set_signal_call_func(VALUE klass,
|
91
98
|
const gchar *signal_name,
|
92
99
|
RGClosureCallFunc func)
|
93
100
|
{
|
94
|
-
VALUE obj = Data_Wrap_Struct(rb_cData, NULL, NULL, func);
|
95
101
|
guint signal_id = g_signal_lookup(signal_name, CLASS2GTYPE(klass));
|
96
|
-
|
102
|
+
g_mutex_lock(&rbg_signal_call_func_table_mutex);
|
103
|
+
g_hash_table_insert(rbg_signal_call_func_table,
|
104
|
+
GUINT_TO_POINTER(signal_id),
|
105
|
+
func);
|
106
|
+
g_mutex_unlock(&rbg_signal_call_func_table_mutex);
|
97
107
|
}
|
98
108
|
|
99
109
|
RGClosureCallFunc
|
100
110
|
rbgobj_get_signal_call_func(guint signal_id)
|
101
111
|
{
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
112
|
+
g_mutex_lock(&rbg_signal_call_func_table_mutex);
|
113
|
+
RGClosureCallFunc func =
|
114
|
+
g_hash_table_lookup(rbg_signal_call_func_table,
|
115
|
+
GUINT_TO_POINTER(signal_id));
|
116
|
+
g_mutex_unlock(&rbg_signal_call_func_table_mutex);
|
106
117
|
return func;
|
107
118
|
}
|
108
119
|
|
@@ -150,7 +161,7 @@ rbg_rval2gtypes_body(VALUE value)
|
|
150
161
|
struct rval2gtypes_args *args = (struct rval2gtypes_args *)value;
|
151
162
|
|
152
163
|
for (i = 0; i < args->n; i++)
|
153
|
-
args->result[i] =
|
164
|
+
args->result[i] = rbgobj_gtype_from_ruby(RARRAY_PTR(args->ary)[i]);
|
154
165
|
|
155
166
|
return Qnil;
|
156
167
|
}
|
@@ -240,7 +251,7 @@ gobj_s_define_signal(int argc, VALUE* argv, VALUE self)
|
|
240
251
|
g_rclosure_set_tag(class_closure, RVAL2CSTR(rb_method_name));
|
241
252
|
}
|
242
253
|
|
243
|
-
return_type =
|
254
|
+
return_type = rbgobj_gtype_from_ruby(rbreturn_type);
|
244
255
|
param_types = RVAL2GTYPES_ACCEPT_NIL(params, n_params);
|
245
256
|
|
246
257
|
signal = g_signal_newv(signal_name,
|
@@ -440,30 +451,33 @@ struct emit_arg {
|
|
440
451
|
|
441
452
|
GSignalQuery query;
|
442
453
|
GQuark detail;
|
443
|
-
|
454
|
+
GArray *instance_and_params;
|
444
455
|
};
|
445
456
|
|
446
457
|
static VALUE
|
447
458
|
emit_body(VALUE rb_arg)
|
448
459
|
{
|
449
460
|
struct emit_arg *arg = (struct emit_arg *)rb_arg;
|
450
|
-
GValue param = G_VALUE_INIT;
|
451
461
|
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
462
|
+
gsize value_index = 0;
|
463
|
+
GValue *gself = &g_array_index(arg->instance_and_params,
|
464
|
+
GValue,
|
465
|
+
value_index);
|
466
|
+
g_value_init(gself, G_TYPE_FROM_INSTANCE(RVAL2GOBJ(arg->self)));
|
467
|
+
rbgobj_rvalue_to_gvalue(arg->self, gself);
|
468
|
+
value_index++;
|
456
469
|
|
457
470
|
{
|
458
471
|
guint i;
|
459
472
|
for (i = 0; i < arg->query.n_params; i++){
|
460
473
|
GType gtype = arg->query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE;
|
461
474
|
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
475
|
+
GValue *gparam = &g_array_index(arg->instance_and_params,
|
476
|
+
GValue,
|
477
|
+
value_index);
|
478
|
+
g_value_init(gparam, gtype);
|
479
|
+
rbgobj_rvalue_to_gvalue(rb_ary_entry(arg->args, i), gparam);
|
480
|
+
value_index++;
|
467
481
|
}
|
468
482
|
}
|
469
483
|
|
@@ -475,7 +489,7 @@ emit_body(VALUE rb_arg)
|
|
475
489
|
g_value_init(&return_value,
|
476
490
|
arg->query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
|
477
491
|
|
478
|
-
g_signal_emitv(arg->instance_and_params->
|
492
|
+
g_signal_emitv((GValue *)(arg->instance_and_params->data),
|
479
493
|
arg->query.signal_id, arg->detail,
|
480
494
|
(use_ret) ? &return_value : NULL);
|
481
495
|
|
@@ -493,7 +507,7 @@ static VALUE
|
|
493
507
|
emit_ensure(VALUE rb_arg)
|
494
508
|
{
|
495
509
|
struct emit_arg *arg = (struct emit_arg *)rb_arg;
|
496
|
-
|
510
|
+
g_array_unref(arg->instance_and_params);
|
497
511
|
return Qnil;
|
498
512
|
}
|
499
513
|
|
@@ -525,7 +539,13 @@ gobj_sig_emit(int argc, VALUE *argv, VALUE self)
|
|
525
539
|
arg.query.n_params + 1);
|
526
540
|
|
527
541
|
arg.self = self;
|
528
|
-
arg.instance_and_params =
|
542
|
+
arg.instance_and_params = g_array_sized_new(FALSE,
|
543
|
+
TRUE,
|
544
|
+
sizeof(GValue),
|
545
|
+
1 + arg.query.n_params);
|
546
|
+
g_array_set_clear_func(arg.instance_and_params,
|
547
|
+
(GDestroyNotify)g_value_unset);
|
548
|
+
g_array_set_size(arg.instance_and_params, 1 + arg.query.n_params);
|
529
549
|
|
530
550
|
return rb_ensure(emit_body, (VALUE)&arg, emit_ensure, (VALUE)&arg);
|
531
551
|
}
|
@@ -628,17 +648,24 @@ static VALUE
|
|
628
648
|
chain_from_overridden_body(VALUE rb_arg)
|
629
649
|
{
|
630
650
|
struct emit_arg *arg = (struct emit_arg *)rb_arg;
|
631
|
-
|
632
|
-
|
633
|
-
|
651
|
+
gsize value_index = 0;
|
652
|
+
GValue *gself = &g_array_index(arg->instance_and_params,
|
653
|
+
GValue,
|
654
|
+
value_index);
|
655
|
+
g_value_init(gself, G_TYPE_FROM_INSTANCE(RVAL2GOBJ(arg->self)));
|
656
|
+
rbgobj_rvalue_to_gvalue(arg->self, gself);
|
657
|
+
value_index++;
|
634
658
|
|
635
659
|
{
|
636
|
-
GValue* params = arg->instance_and_params->values + 1;
|
637
660
|
guint i;
|
638
661
|
for (i = 0; i < arg->query.n_params; i++) {
|
639
662
|
GType gtype = arg->query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE;
|
640
|
-
|
641
|
-
|
663
|
+
GValue *gparam = &g_array_index(arg->instance_and_params,
|
664
|
+
GValue,
|
665
|
+
value_index);
|
666
|
+
g_value_init(gparam, gtype);
|
667
|
+
rbgobj_rvalue_to_gvalue(rb_ary_entry(arg->args, i), gparam);
|
668
|
+
value_index++;
|
642
669
|
}
|
643
670
|
}
|
644
671
|
|
@@ -650,7 +677,7 @@ chain_from_overridden_body(VALUE rb_arg)
|
|
650
677
|
g_value_init(&return_value,
|
651
678
|
arg->query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
|
652
679
|
|
653
|
-
g_signal_chain_from_overridden(arg->instance_and_params->
|
680
|
+
g_signal_chain_from_overridden((GValue *)(arg->instance_and_params->data),
|
654
681
|
(use_ret) ? &return_value : NULL);
|
655
682
|
|
656
683
|
if (use_ret) {
|
@@ -682,7 +709,13 @@ gobj_sig_chain_from_overridden(int argc, VALUE *argv, VALUE self)
|
|
682
709
|
|
683
710
|
arg.self = self;
|
684
711
|
arg.args = rb_ary_new4(argc, argv);
|
685
|
-
arg.instance_and_params =
|
712
|
+
arg.instance_and_params = g_array_sized_new(FALSE,
|
713
|
+
TRUE,
|
714
|
+
sizeof(GValue),
|
715
|
+
1 + argc);
|
716
|
+
g_array_set_clear_func(arg.instance_and_params,
|
717
|
+
(GDestroyNotify)g_value_unset);
|
718
|
+
g_array_set_size(arg.instance_and_params, 1 + argc);
|
686
719
|
|
687
720
|
return rb_ensure(chain_from_overridden_body, (VALUE)&arg,
|
688
721
|
emit_ensure, (VALUE)&arg);
|
@@ -699,7 +732,7 @@ gobj_s_method_added(VALUE klass, VALUE id)
|
|
699
732
|
if (cinfo->klass != klass) return Qnil;
|
700
733
|
if (strncmp(default_handler_method_prefix, name, prefix_len)) return Qnil;
|
701
734
|
|
702
|
-
signal_id = g_signal_lookup(name + prefix_len, cinfo->gtype);
|
735
|
+
signal_id = g_signal_lookup(name + prefix_len, cinfo->gtype);
|
703
736
|
if (!signal_id) return Qnil;
|
704
737
|
|
705
738
|
{
|
@@ -947,7 +980,7 @@ Init_gobject_gsignal(void)
|
|
947
980
|
{
|
948
981
|
VALUE cSignalFlags, cSignalMatchType;
|
949
982
|
|
950
|
-
RG_TARGET_NAMESPACE = rb_define_class_under(mGLib, "Signal",
|
983
|
+
RG_TARGET_NAMESPACE = rb_define_class_under(mGLib, "Signal", rb_cObject);
|
951
984
|
|
952
985
|
RG_DEF_METHOD(id, 0);
|
953
986
|
RG_DEF_METHOD(name, 0);
|
@@ -990,11 +1023,11 @@ Init_gobject_gsignal(void)
|
|
990
1023
|
|
991
1024
|
eNoSignalError = rb_define_class_under(mGLib, "NoSignalError", rb_eNameError);
|
992
1025
|
|
993
|
-
|
994
|
-
|
1026
|
+
rbg_signal_func_table = g_hash_table_new(g_direct_hash, g_direct_equal);
|
1027
|
+
g_mutex_init(&rbg_signal_func_table_mutex);
|
995
1028
|
|
996
|
-
|
997
|
-
|
1029
|
+
rbg_signal_call_func_table = g_hash_table_new(g_direct_hash, g_direct_equal);
|
1030
|
+
g_mutex_init(&rbg_signal_call_func_table_mutex);
|
998
1031
|
|
999
1032
|
rbg_define_method(mMetaInterface, "define_signal", gobj_s_define_signal, -1);
|
1000
1033
|
rb_define_alias(mMetaInterface, "signal_new", "define_signal");
|
data/ext/glib2/rbgobj_strv.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011 Ruby-
|
3
|
+
* Copyright (C) 2011-2020 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2005 Masao Mutoh
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -30,7 +30,7 @@ strv_to_ruby(const GValue *from)
|
|
30
30
|
static void
|
31
31
|
strv_from_ruby(VALUE from, GValue *to)
|
32
32
|
{
|
33
|
-
|
33
|
+
gchar **strings = RVAL2STRV(from);
|
34
34
|
g_value_set_boxed(to, strings);
|
35
35
|
g_free(strings);
|
36
36
|
}
|
data/ext/glib2/rbgobj_type.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-2021 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
|
@@ -31,9 +31,10 @@ static VALUE rb_cMutex;
|
|
31
31
|
#endif
|
32
32
|
static VALUE lookup_class_mutex;
|
33
33
|
|
34
|
+
static ID id_gtype;
|
35
|
+
static ID id_lock;
|
34
36
|
static ID id_new;
|
35
37
|
static ID id_superclass;
|
36
|
-
static ID id_lock;
|
37
38
|
static ID id_unlock;
|
38
39
|
static GHashTable *gtype_to_cinfo;
|
39
40
|
static VALUE klass_to_cinfo;
|
@@ -110,7 +111,7 @@ rbgobj_class_info_create_data_type(VALUE klass)
|
|
110
111
|
if (RB_TYPE_P(klass, RUBY_T_CLASS) && klass != rb_cObject) {
|
111
112
|
VALUE p = RCLASS_SUPER(klass);
|
112
113
|
while (p != rb_cObject) {
|
113
|
-
if (RTYPEDDATA_P(p)) {
|
114
|
+
if (RB_TYPE_P(p, RUBY_T_DATA) && RTYPEDDATA_P(p)) {
|
114
115
|
data_type->parent = RTYPEDDATA_TYPE(p);
|
115
116
|
break;
|
116
117
|
}
|
@@ -133,7 +134,7 @@ rbgobj_class_info_register_without_lock(GType gtype, VALUE klass)
|
|
133
134
|
VALUE c;
|
134
135
|
|
135
136
|
data_type = rbgobj_class_info_create_data_type(klass);
|
136
|
-
c = TypedData_Make_Struct(
|
137
|
+
c = TypedData_Make_Struct(rb_cObject, RGObjClassInfo, data_type, cinfo);
|
137
138
|
cinfo->klass = klass;
|
138
139
|
cinfo->gtype = gtype;
|
139
140
|
cinfo->mark = NULL;
|
@@ -238,9 +239,7 @@ get_superclass(GType gtype, VALUE module)
|
|
238
239
|
case G_TYPE_OBJECT:
|
239
240
|
return cInstantiatable;
|
240
241
|
case G_TYPE_BOXED:
|
241
|
-
return rb_cObject;
|
242
242
|
case G_TYPE_POINTER:
|
243
|
-
return rb_cData;
|
244
243
|
case G_TYPE_ENUM:
|
245
244
|
case G_TYPE_FLAGS:
|
246
245
|
return rb_cObject;
|
@@ -432,9 +431,9 @@ rbgobj_gtype_to_ruby_class(GType gtype)
|
|
432
431
|
GType
|
433
432
|
rbgobj_gtype_from_ruby(VALUE rb_gtype)
|
434
433
|
{
|
435
|
-
|
436
|
-
|
437
|
-
if (RB_TYPE_P(rb_gtype, RUBY_T_STRING)) {
|
434
|
+
if (NIL_P(rb_gtype)) {
|
435
|
+
return G_TYPE_NONE;
|
436
|
+
} else if (RB_TYPE_P(rb_gtype, RUBY_T_STRING)) {
|
438
437
|
GType gtype;
|
439
438
|
gtype = g_type_from_name(RVAL2CSTR(rb_gtype));
|
440
439
|
if (gtype == G_TYPE_INVALID) {
|
@@ -443,14 +442,13 @@ rbgobj_gtype_from_ruby(VALUE rb_gtype)
|
|
443
442
|
RVAL2CSTR(rb_gtype));
|
444
443
|
}
|
445
444
|
return gtype;
|
445
|
+
} else if (RVAL2CBOOL(rb_obj_is_kind_of(rb_gtype, RG_TARGET_NAMESPACE))) {
|
446
|
+
return NUM2SIZET(rb_ivar_get(rb_gtype, id_gtype));
|
447
|
+
} else if (RVAL2CBOOL(rb_obj_is_kind_of(rb_gtype, rb_cClass))) {
|
448
|
+
return CLASS2GTYPE(rb_gtype);
|
449
|
+
} else {
|
450
|
+
return NUM2SIZET(rb_to_int(rb_gtype));
|
446
451
|
}
|
447
|
-
|
448
|
-
CONST_ID(id_gtype, "gtype");
|
449
|
-
if (rb_respond_to(rb_gtype, id_gtype)) {
|
450
|
-
rb_gtype = rb_funcall(rb_gtype, id_gtype, 0);
|
451
|
-
}
|
452
|
-
|
453
|
-
return NUM2ULONG(rb_gtype);
|
454
452
|
}
|
455
453
|
|
456
454
|
VALUE
|
@@ -532,7 +530,7 @@ rbgobj_register_class(VALUE klass,
|
|
532
530
|
|
533
531
|
if (klass2gtype) {
|
534
532
|
data_type = rbgobj_class_info_create_data_type(klass);
|
535
|
-
c = TypedData_Make_Struct(
|
533
|
+
c = TypedData_Make_Struct(rb_cObject, RGObjClassInfo, data_type, cinfo);
|
536
534
|
}
|
537
535
|
if (gtype2klass && !cinfo)
|
538
536
|
cinfo = g_new(RGObjClassInfo, 1);
|
@@ -607,26 +605,21 @@ init_typemap(void)
|
|
607
605
|
/* GLib::Type */
|
608
606
|
|
609
607
|
VALUE RG_TARGET_NAMESPACE;
|
610
|
-
static ID id_gtype;
|
611
608
|
|
612
609
|
VALUE
|
613
610
|
rbgobj_gtype_new(GType gtype)
|
614
611
|
{
|
615
612
|
VALUE result = rb_obj_alloc(RG_TARGET_NAMESPACE);
|
616
|
-
VALUE arg =
|
613
|
+
VALUE arg = SIZET2NUM(gtype);
|
617
614
|
rb_obj_call_init(result, 1, &arg);
|
618
615
|
return result;
|
619
616
|
}
|
620
617
|
|
618
|
+
/* Deprecated. Use rbgobj_gtype_from_ruby() instead. */
|
621
619
|
GType
|
622
|
-
rbgobj_gtype_get(VALUE
|
620
|
+
rbgobj_gtype_get(VALUE rb_gtype)
|
623
621
|
{
|
624
|
-
|
625
|
-
return NUM2ULONG(rb_ivar_get(self, id_gtype));
|
626
|
-
} else {
|
627
|
-
return CLASS2GTYPE(self);
|
628
|
-
}
|
629
|
-
rb_raise(rb_eTypeError, "Not a GLib::Type");
|
622
|
+
return rbgobj_gtype_from_ruby(rb_gtype);
|
630
623
|
}
|
631
624
|
|
632
625
|
static VALUE
|
@@ -690,7 +683,7 @@ rg_initialize(VALUE self, VALUE type)
|
|
690
683
|
GType gtype;
|
691
684
|
|
692
685
|
if (RVAL2CBOOL(rb_obj_is_kind_of(type, rb_cInteger))) {
|
693
|
-
gtype =
|
686
|
+
gtype = NUM2SIZET(type);
|
694
687
|
if (!g_type_name(gtype))
|
695
688
|
gtype = G_TYPE_INVALID;
|
696
689
|
} else {
|
@@ -700,7 +693,7 @@ rg_initialize(VALUE self, VALUE type)
|
|
700
693
|
if (G_TYPE_INVALID == gtype)
|
701
694
|
rb_raise(rb_eArgError, "invalid GType");
|
702
695
|
|
703
|
-
rb_ivar_set(self, id_gtype,
|
696
|
+
rb_ivar_set(self, id_gtype, SIZET2NUM(gtype));
|
704
697
|
|
705
698
|
return Qnil;
|
706
699
|
}
|
@@ -708,7 +701,7 @@ rg_initialize(VALUE self, VALUE type)
|
|
708
701
|
static VALUE
|
709
702
|
rg_inspect(VALUE self)
|
710
703
|
{
|
711
|
-
GType gtype =
|
704
|
+
GType gtype = rbgobj_gtype_from_ruby(self);
|
712
705
|
gchar* str;
|
713
706
|
VALUE result;
|
714
707
|
|
@@ -725,8 +718,8 @@ rg_operator_type_compare(VALUE self, VALUE other)
|
|
725
718
|
if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
|
726
719
|
return Qnil;
|
727
720
|
else {
|
728
|
-
GType a =
|
729
|
-
GType b =
|
721
|
+
GType a = rbgobj_gtype_from_ruby(self);
|
722
|
+
GType b = rbgobj_gtype_from_ruby(other);
|
730
723
|
|
731
724
|
if (a==b)
|
732
725
|
return INT2FIX(0);
|
@@ -745,8 +738,8 @@ rg_operator_type_eq(VALUE self, VALUE other)
|
|
745
738
|
if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
|
746
739
|
return Qnil;
|
747
740
|
else {
|
748
|
-
GType a =
|
749
|
-
GType b =
|
741
|
+
GType a = rbgobj_gtype_from_ruby(self);
|
742
|
+
GType b = rbgobj_gtype_from_ruby(other);
|
750
743
|
return CBOOL2RVAL(a == b);
|
751
744
|
}
|
752
745
|
}
|
@@ -757,8 +750,8 @@ rg_operator_type_lt_eq(VALUE self, VALUE other)
|
|
757
750
|
if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
|
758
751
|
return Qnil;
|
759
752
|
else {
|
760
|
-
GType a =
|
761
|
-
GType b =
|
753
|
+
GType a = rbgobj_gtype_from_ruby(self);
|
754
|
+
GType b = rbgobj_gtype_from_ruby(other);
|
762
755
|
return CBOOL2RVAL(g_type_is_a(a, b));
|
763
756
|
}
|
764
757
|
}
|
@@ -769,8 +762,8 @@ rg_operator_type_gt_eq(VALUE self, VALUE other)
|
|
769
762
|
if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
|
770
763
|
return Qnil;
|
771
764
|
else {
|
772
|
-
GType a =
|
773
|
-
GType b =
|
765
|
+
GType a = rbgobj_gtype_from_ruby(self);
|
766
|
+
GType b = rbgobj_gtype_from_ruby(other);
|
774
767
|
return CBOOL2RVAL(g_type_is_a(b, a));
|
775
768
|
}
|
776
769
|
}
|
@@ -781,8 +774,8 @@ rg_operator_type_lt(VALUE self, VALUE other)
|
|
781
774
|
if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
|
782
775
|
return Qnil;
|
783
776
|
else {
|
784
|
-
GType a =
|
785
|
-
GType b =
|
777
|
+
GType a = rbgobj_gtype_from_ruby(self);
|
778
|
+
GType b = rbgobj_gtype_from_ruby(other);
|
786
779
|
return CBOOL2RVAL(g_type_is_a(a, b) && a != b);
|
787
780
|
}
|
788
781
|
}
|
@@ -793,8 +786,8 @@ rg_operator_type_gt(VALUE self, VALUE other)
|
|
793
786
|
if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
|
794
787
|
return Qnil;
|
795
788
|
else {
|
796
|
-
GType a =
|
797
|
-
GType b =
|
789
|
+
GType a = rbgobj_gtype_from_ruby(self);
|
790
|
+
GType b = rbgobj_gtype_from_ruby(other);
|
798
791
|
return CBOOL2RVAL(g_type_is_a(b, a) && a != b);
|
799
792
|
}
|
800
793
|
}
|
@@ -808,112 +801,113 @@ rg_hash(VALUE self)
|
|
808
801
|
static VALUE
|
809
802
|
rg_to_class(VALUE self)
|
810
803
|
{
|
811
|
-
return GTYPE2CLASS(
|
804
|
+
return GTYPE2CLASS(rbgobj_gtype_from_ruby(self));
|
812
805
|
}
|
813
806
|
|
814
807
|
static VALUE
|
815
808
|
rg_fundamental(VALUE self)
|
816
809
|
{
|
817
|
-
return rbgobj_gtype_new(G_TYPE_FUNDAMENTAL(
|
810
|
+
return rbgobj_gtype_new(G_TYPE_FUNDAMENTAL(rbgobj_gtype_from_ruby(self)));
|
818
811
|
}
|
819
812
|
|
820
813
|
static VALUE
|
821
814
|
rg_fundamental_p(VALUE self)
|
822
815
|
{
|
823
|
-
return CBOOL2RVAL(G_TYPE_IS_FUNDAMENTAL(
|
816
|
+
return CBOOL2RVAL(G_TYPE_IS_FUNDAMENTAL(rbgobj_gtype_from_ruby(self)));
|
824
817
|
}
|
825
818
|
|
826
819
|
static VALUE
|
827
820
|
rg_derived_p(VALUE self)
|
828
821
|
{
|
829
|
-
return CBOOL2RVAL(G_TYPE_IS_DERIVED(
|
822
|
+
return CBOOL2RVAL(G_TYPE_IS_DERIVED(rbgobj_gtype_from_ruby(self)));
|
830
823
|
}
|
831
824
|
|
832
825
|
static VALUE
|
833
826
|
rg_interface_p(VALUE self)
|
834
827
|
{
|
835
|
-
return CBOOL2RVAL(G_TYPE_IS_INTERFACE(
|
828
|
+
return CBOOL2RVAL(G_TYPE_IS_INTERFACE(rbgobj_gtype_from_ruby(self)));
|
836
829
|
}
|
837
830
|
|
838
831
|
static VALUE
|
839
832
|
rg_classed_p(VALUE self)
|
840
833
|
{
|
841
|
-
return CBOOL2RVAL(G_TYPE_IS_CLASSED(
|
834
|
+
return CBOOL2RVAL(G_TYPE_IS_CLASSED(rbgobj_gtype_from_ruby(self)));
|
842
835
|
}
|
843
836
|
|
844
837
|
static VALUE
|
845
838
|
rg_instantiatable_p(VALUE self)
|
846
839
|
{
|
847
|
-
return CBOOL2RVAL(G_TYPE_IS_INSTANTIATABLE(
|
840
|
+
return CBOOL2RVAL(G_TYPE_IS_INSTANTIATABLE(rbgobj_gtype_from_ruby(self)));
|
848
841
|
}
|
849
842
|
|
850
843
|
static VALUE
|
851
844
|
rg_derivable_p(VALUE self)
|
852
845
|
{
|
853
|
-
return CBOOL2RVAL(G_TYPE_IS_DERIVABLE(
|
846
|
+
return CBOOL2RVAL(G_TYPE_IS_DERIVABLE(rbgobj_gtype_from_ruby(self)));
|
854
847
|
}
|
855
848
|
|
856
849
|
static VALUE
|
857
850
|
rg_deep_derivable_p(VALUE self)
|
858
851
|
{
|
859
|
-
return CBOOL2RVAL(G_TYPE_IS_DEEP_DERIVABLE(
|
852
|
+
return CBOOL2RVAL(G_TYPE_IS_DEEP_DERIVABLE(rbgobj_gtype_from_ruby(self)));
|
860
853
|
}
|
861
854
|
|
862
855
|
static VALUE
|
863
856
|
rg_abstract_p(VALUE self)
|
864
857
|
{
|
865
|
-
return CBOOL2RVAL(G_TYPE_IS_ABSTRACT(
|
858
|
+
return CBOOL2RVAL(G_TYPE_IS_ABSTRACT(rbgobj_gtype_from_ruby(self)));
|
866
859
|
}
|
867
860
|
|
868
861
|
static VALUE
|
869
862
|
rg_value_abstract_p(VALUE self)
|
870
863
|
{
|
871
|
-
return CBOOL2RVAL(G_TYPE_IS_VALUE_ABSTRACT(
|
864
|
+
return CBOOL2RVAL(G_TYPE_IS_VALUE_ABSTRACT(rbgobj_gtype_from_ruby(self)));
|
872
865
|
}
|
873
866
|
|
874
867
|
static VALUE
|
875
868
|
rg_value_type_p(VALUE self)
|
876
869
|
{
|
877
|
-
return CBOOL2RVAL(G_TYPE_IS_VALUE_TYPE(
|
870
|
+
return CBOOL2RVAL(G_TYPE_IS_VALUE_TYPE(rbgobj_gtype_from_ruby(self)));
|
878
871
|
}
|
879
872
|
|
880
873
|
static VALUE
|
881
874
|
rg_has_value_table(VALUE self)
|
882
875
|
{
|
883
|
-
return CBOOL2RVAL(G_TYPE_HAS_VALUE_TABLE(
|
876
|
+
return CBOOL2RVAL(G_TYPE_HAS_VALUE_TABLE(rbgobj_gtype_from_ruby(self)));
|
884
877
|
}
|
885
878
|
|
886
879
|
static VALUE
|
887
880
|
rg_name(VALUE self)
|
888
881
|
{
|
889
|
-
return rb_str_new2(g_type_name(
|
882
|
+
return rb_str_new2(g_type_name(rbgobj_gtype_from_ruby(self)));
|
890
883
|
}
|
891
884
|
|
892
885
|
static VALUE
|
893
886
|
rg_parent(VALUE self)
|
894
887
|
{
|
895
|
-
GType parent = g_type_parent(
|
888
|
+
GType parent = g_type_parent(rbgobj_gtype_from_ruby(self));
|
896
889
|
return parent ? rbgobj_gtype_new(parent) : Qnil;
|
897
890
|
}
|
898
891
|
|
899
892
|
static VALUE
|
900
893
|
rg_depth(VALUE self)
|
901
894
|
{
|
902
|
-
return UINT2NUM(g_type_depth(
|
895
|
+
return UINT2NUM(g_type_depth(rbgobj_gtype_from_ruby(self)));
|
903
896
|
}
|
904
897
|
|
905
898
|
static VALUE
|
906
899
|
rg_next_base(VALUE leaf_type, VALUE root_type)
|
907
900
|
{
|
908
|
-
GType ret = g_type_next_base(
|
909
|
-
|
901
|
+
GType ret = g_type_next_base(rbgobj_gtype_from_ruby(leaf_type),
|
902
|
+
rbgobj_gtype_from_ruby(root_type));
|
910
903
|
return ret ? rbgobj_gtype_new(ret) : Qnil;
|
911
904
|
}
|
912
905
|
|
913
906
|
static VALUE
|
914
907
|
rg_type_is_a_p(VALUE self, VALUE is_a_type)
|
915
908
|
{
|
916
|
-
return CBOOL2RVAL(g_type_is_a(
|
909
|
+
return CBOOL2RVAL(g_type_is_a(rbgobj_gtype_from_ruby(self),
|
910
|
+
rbgobj_gtype_from_ruby(is_a_type)));
|
917
911
|
}
|
918
912
|
|
919
913
|
#if 0
|
@@ -934,7 +928,7 @@ rg_children(VALUE self)
|
|
934
928
|
VALUE result;
|
935
929
|
guint i;
|
936
930
|
|
937
|
-
types = g_type_children(
|
931
|
+
types = g_type_children(rbgobj_gtype_from_ruby(self), &n_children);
|
938
932
|
result = rb_ary_new2(n_children);
|
939
933
|
for (i = 0; i < n_children; i++)
|
940
934
|
rb_ary_store(result, i, rbgobj_gtype_new(types[i]));
|
@@ -951,7 +945,7 @@ rg_interfaces(VALUE self)
|
|
951
945
|
VALUE result;
|
952
946
|
guint i;
|
953
947
|
|
954
|
-
types = g_type_interfaces(
|
948
|
+
types = g_type_interfaces(rbgobj_gtype_from_ruby(self), &n_interfaces);
|
955
949
|
result = rb_ary_new2(n_interfaces);
|
956
950
|
for (i = 0; i < n_interfaces; i++)
|
957
951
|
rb_ary_store(result, i, rbgobj_gtype_new(types[i]));
|
@@ -964,7 +958,7 @@ static VALUE
|
|
964
958
|
rg_class_size(VALUE self)
|
965
959
|
{
|
966
960
|
GTypeQuery query;
|
967
|
-
g_type_query(
|
961
|
+
g_type_query(rbgobj_gtype_from_ruby(self), &query);
|
968
962
|
return UINT2NUM(query.class_size);
|
969
963
|
}
|
970
964
|
|
@@ -972,7 +966,7 @@ static VALUE
|
|
972
966
|
rg_instance_size(VALUE self)
|
973
967
|
{
|
974
968
|
GTypeQuery query;
|
975
|
-
g_type_query(
|
969
|
+
g_type_query(rbgobj_gtype_from_ruby(self), &query);
|
976
970
|
return UINT2NUM(query.instance_size);
|
977
971
|
}
|
978
972
|
|
@@ -989,10 +983,6 @@ _def_fundamental_type(VALUE ary, GType gtype, const char* name)
|
|
989
983
|
void
|
990
984
|
Init_gobject_gtype(void)
|
991
985
|
{
|
992
|
-
#if !GLIB_CHECK_VERSION(2, 35, 1)
|
993
|
-
g_type_init();
|
994
|
-
#endif
|
995
|
-
|
996
986
|
init_typemap();
|
997
987
|
|
998
988
|
/* type */
|