glib2 4.2.4 → 4.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75f66210f00c8c877df17742b6e6e0648bce06d88b427b59671a7953d5c90bc0
4
- data.tar.gz: 9485c80fd6515568f1f7e3eca427b940c23308e1998875d9475d4f9e6877a466
3
+ metadata.gz: e278dde163e8d497ede015df6d5b274379bfe750ac7ffd56da075f131788363d
4
+ data.tar.gz: 8eb2125a49ae54dab3551f626e3ed16cba35637782f0237094ec9408f3afe3eb
5
5
  SHA512:
6
- metadata.gz: 334279af523347fca47aa14d0e7a68e0159994eec798135c0fa383815a8e206aeb6c07c149bc51c63b5c446b6791a060890ff1a77ec6d254360986e85d9d75c8
7
- data.tar.gz: ce13e24f8b66e55ccc47639494c97aac8c5dd2b9d8fc28a385bca7f2bd39acfae349375ba75d146bb0849efd41c165febaf6697fefa87586a4ff6cf0bb8ee378
6
+ metadata.gz: 213be1775836e0fc704ecda13ccc0acec168a663c7d7febcf469ad09231d6a61e6096e980fdbbc7187001024dff57dcc43e43f9620f6cc51241e3664b57f0f6d
7
+ data.tar.gz: 1b3d657906865e78ef16f13585f8c32c5881f59096496c076c178df2ec653068dda7d2529d75266d203639172dd87e7e673ac01c661185bb3e3cf651c57f41e2
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Ruby/GLib2
2
2
 
3
- Ruby/GLib2 is a Ruby binding of GLib 2.48 or later.
3
+ Ruby/GLib2 is a Ruby binding of GLib 2.56 or later.
4
4
 
5
5
  ## Requirements
6
6
 
7
7
  * Ruby >= 2.5: https://www.ruby-lang.org/
8
8
  * pkg-config.rb: https://github.com/ruby-gnome/pkg-config
9
- * GLib >= 2.48: https://www.gtk.org/
9
+ * GLib >= 2.56: https://www.gtk.org/
10
10
 
11
11
  ## Install
12
12
 
@@ -16,7 +16,7 @@ gem install glib2
16
16
 
17
17
  ## Copying
18
18
 
19
- Copyright (c) 2002-2021 Ruby-GNOME Project Team
19
+ Copyright (C) 2002-2025 Ruby-GNOME Project Team
20
20
 
21
21
  This program is free software.
22
22
  You can distribute/modify this program under the terms of
data/Rakefile CHANGED
@@ -19,10 +19,10 @@
19
19
  base_dir = __dir__
20
20
 
21
21
  $LOAD_PATH.unshift(File.join(base_dir, "lib"))
22
- require "gnome2/rake/package-task"
22
+ require "gnome/rake/package-task"
23
23
 
24
24
  package_name = File.basename(base_dir)
25
25
  spec = Gem::Specification.load(File.join(base_dir, "#{package_name}.gemspec"))
26
26
 
27
- GNOME2::Rake::PackageTask.define(spec, __dir__) do |package|
27
+ GNOME::Rake::PackageTask.define(spec, __dir__) do |package|
28
28
  end
data/ext/glib2/extconf.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2002-2023 Ruby-GNOME Project Team
1
+ # Copyright (C) 2002-2025 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
@@ -26,7 +26,7 @@ package_id = "gobject-2.0"
26
26
 
27
27
  require "mkmf-gnome"
28
28
 
29
- unless required_pkg_config_package([package_id, 2, 12, 0],
29
+ unless required_pkg_config_package([package_id, 2, 56, 0],
30
30
  :alt_linux => "glib2-devel",
31
31
  :arch_linux => "glib2",
32
32
  :conda => "glib",
data/ext/glib2/glib2.def CHANGED
@@ -20,7 +20,6 @@ EXPORTS
20
20
  rbgobj_instance_unref
21
21
  rbgobj_get_ruby_object_from_gobject
22
22
  rbgobj_create_object
23
- rbgobj_gobject_new
24
23
  rbgobj_gobject_initialize
25
24
  rbgobj_boxed_alloc_func
26
25
  rbgobj_boxed_create
@@ -132,9 +131,8 @@ EXPORTS
132
131
  rbg_gslist2rval_with_type
133
132
  rbg_rval2glist
134
133
  rbg_rval2gslist
135
- rbg_define_method
136
- rbg_define_private_method
137
- rbg_define_singleton_method
134
+ rbg_define_setter_alias_if_need
135
+ rbg_define_singleton_setter_alias_if_need
138
136
  rbg_to_array
139
137
  rbg_to_hash
140
138
  rbg_check_array_type
@@ -175,7 +173,6 @@ EXPORTS
175
173
  rbglib_num_to_uint64
176
174
  rbglib_uint64_to_num
177
175
  rbglib_num_to_int64
178
- rbglib_int64_to_num
179
176
  rbg_variant_to_ruby
180
177
  rbg_variant_from_ruby
181
178
  rbg_variant_type_from_ruby
@@ -113,7 +113,7 @@ static const rb_data_type_t rbg_variant_type = {
113
113
  NULL,
114
114
  rg_variant_free,
115
115
  },
116
- NULL,
116
+ &rbg_glib_instantiatable_type,
117
117
  NULL,
118
118
  RUBY_TYPED_FREE_IMMEDIATELY |
119
119
  RUBY_TYPED_WB_PROTECTED |
data/ext/glib2/rbglib.c CHANGED
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2024 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 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,16 +23,18 @@
23
23
  #include "rbgprivate.h"
24
24
  #include "rbglib.h"
25
25
 
26
- #define RG_TARGET_NAMESPACE mGLib
26
+ #define RG_TARGET_NAMESPACE rbg_mGLib()
27
27
 
28
28
  static ID id_inspect;
29
29
 
30
- VALUE RG_TARGET_NAMESPACE;
30
+ VALUE mGLib;
31
31
 
32
32
  VALUE
33
33
  rbg_mGLib(void)
34
34
  {
35
- return RG_TARGET_NAMESPACE;
35
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
36
+ return mGLib;
37
+ G_GNUC_END_IGNORE_DEPRECATIONS
36
38
  }
37
39
 
38
40
  const gchar *
@@ -1105,7 +1107,9 @@ Init_glib2(void)
1105
1107
 
1106
1108
  id_inspect = rb_intern("inspect");
1107
1109
 
1108
- RG_TARGET_NAMESPACE = rb_define_module("GLib");
1110
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
1111
+ mGLib = rb_define_module("GLib");
1112
+ G_GNUC_END_IGNORE_DEPRECATIONS
1109
1113
 
1110
1114
  setlocale (LC_CTYPE, "");
1111
1115
  #ifdef LC_MESSAGES
@@ -1157,7 +1161,7 @@ Init_glib2(void)
1157
1161
  rb_define_const(RG_TARGET_NAMESPACE, "MAXINT16", INT2FIX(G_MAXINT16));
1158
1162
  rb_define_const(RG_TARGET_NAMESPACE, "MAXUINT16", UINT2NUM(G_MAXUINT16));
1159
1163
 
1160
- rb_define_const(RG_TARGET_NAMESPACE, "MININT32", INT2FIX(G_MININT32));
1164
+ rb_define_const(RG_TARGET_NAMESPACE, "MININT32", INT2NUM(G_MININT32));
1161
1165
  rb_define_const(RG_TARGET_NAMESPACE, "MAXINT32", INT2NUM(G_MAXINT32));
1162
1166
  rb_define_const(RG_TARGET_NAMESPACE, "MAXUINT32", UINT2NUM(G_MAXUINT32));
1163
1167
 
@@ -1248,7 +1252,6 @@ union GDoubleIEEE754;
1248
1252
  Init_gutil_callback();
1249
1253
 
1250
1254
  Init_glib_gettext();
1251
- Init_glib_int64();
1252
1255
  Init_glib_error();
1253
1256
  Init_glib_threads();
1254
1257
  Init_glib_convert();
data/ext/glib2/rbglib.h CHANGED
@@ -33,49 +33,14 @@ G_BEGIN_DECLS
33
33
 
34
34
  #define RBGLIB_MAJOR_VERSION 4
35
35
  #define RBGLIB_MINOR_VERSION 2
36
- #define RBGLIB_MICRO_VERSION 4
36
+ #define RBGLIB_MICRO_VERSION 6
37
37
 
38
- #ifndef RB_ZALLOC
39
- # ifdef ZALLOC
40
- # define RB_ZALLOC(type) ZALLOC(type)
41
- # else
42
- # define RB_ZALLOC(type) rbg_memzero(ALLOC(type), sizeof(type))
43
- # endif
38
+ /* For Ruby < 3.0 */
39
+ #ifndef RB_LL2NUM
40
+ # define RB_LL2NUM LL2NUM
44
41
  #endif
45
-
46
- #ifndef RB_ALLOC
47
- # define RB_ALLOC(type) ALLOC(type)
48
- #endif
49
-
50
- #ifndef RB_ALLOC_N
51
- # define RB_ALLOC_N(type, n) ALLOC_N(type, n)
52
- #endif
53
-
54
- /* For Ruby < 2.3 */
55
- #ifndef RB_OBJ_FROZEN
56
- # define RB_OBJ_FROZEN(obj) OBJ_FROZEN(obj)
57
- #endif
58
-
59
- #ifndef RSTRING_PTR
60
- # define RSTRING_PTR(s) (RSTRING(s)->ptr)
61
- # define RSTRING_LEN(s) (RSTRING(s)->len)
62
- #endif
63
-
64
- #ifndef RARRAY_PTR
65
- # define RARRAY_PTR(a) (RARRAY(a)->ptr)
66
- # define RARRAY_LEN(a) (RARRAY(a)->len)
67
- #endif
68
-
69
- #ifndef RARRAY_CONST_PTR
70
- # define RARRAY_CONST_PTR(a) RARRAY_PTR(a)
71
- #endif
72
-
73
- #ifndef DBL2NUM
74
- # define DBL2NUM(v) (rb_float_new(v))
75
- #endif
76
-
77
- #ifndef RBASIC_CLASS
78
- # define RBASIC_CLASS(obj) (RBASIC(obj)->klass)
42
+ #ifndef RB_ULL2NUM
43
+ # define RB_ULL2NUM ULL2NUM
79
44
  #endif
80
45
 
81
46
  #ifndef G_SOURCE_REMOVE
@@ -143,11 +108,11 @@ G_BEGIN_DECLS
143
108
  #define POINTER2RVAL(pointer) ((VALUE)(pointer))
144
109
 
145
110
  #if SIZEOF_VOIDP == SIZEOF_LONG
146
- # define NUM2POINTER(number) ((gpointer)NUM2ULONG(number))
147
- # define POINTER2NUM(pointer) ULONG2NUM((unsigned long)pointer)
111
+ # define NUM2POINTER(number) ((gpointer)RB_NUM2ULONG(number))
112
+ # define POINTER2NUM(pointer) RB_ULONG2NUM((unsigned long)pointer)
148
113
  #else
149
- # define NUM2POINTER(number) ((gpointer)NUM2ULL(number))
150
- # define POINTER2NUM(pointer) ULL2NUM((unsigned LONG_LONG)pointer)
114
+ # define NUM2POINTER(number) ((gpointer)RB_NUM2ULL(number))
115
+ # define POINTER2NUM(pointer) RB_ULL2NUM((unsigned LONG_LONG)pointer)
151
116
  #endif
152
117
 
153
118
  #define GINTS2RVAL(ary, n) rbg_gints2rval(ary, n)
@@ -245,6 +210,8 @@ extern GQuark rbgerr_ruby_error_quark(void);
245
210
  extern VALUE rbgerr_gerror2exception(GError *error);
246
211
  extern VALUE rbgerr_define_gerror(GQuark domain, const gchar* name, VALUE module, VALUE parent, GType gtype);
247
212
 
213
+ /* Deprecated. Use RB_LL2NUM()/RB_ULL2NUM()/RB_NUM2LL()/RB_NUM2ULL()
214
+ * directly. */
248
215
  extern VALUE rbglib_int64_to_num(guint64 val);
249
216
  extern VALUE rbglib_uint64_to_num(guint64 val);
250
217
  extern gint64 rbglib_num_to_int64(VALUE val);
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2021 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 Ruby-GNOME Project Team
4
4
  * Copyright (C) 2004 Masao Mutoh
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
@@ -50,7 +50,7 @@ void g_dir_close (GDir *dir);
50
50
  */
51
51
 
52
52
  static VALUE
53
- rbglib_m_format_size(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
53
+ rg_s_format_size(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
54
54
  {
55
55
  VALUE rb_size, rb_options;
56
56
 
@@ -98,6 +98,7 @@ Init_glib_fileutils(void)
98
98
  rb_define_const(RG_TARGET_NAMESPACE, "PERM", INT2NUM(G_FILE_ERROR_PERM));
99
99
  rb_define_const(RG_TARGET_NAMESPACE, "FAILED", INT2NUM(G_FILE_ERROR_FAILED));
100
100
 
101
- rbg_define_singleton_method(rbg_mGLib(), "format_size",
102
- rbglib_m_format_size, -1);
101
+ #undef RG_TARGET_NAMESPACE
102
+ #define RG_TARGET_NAMESPACE rbg_mGLib()
103
+ RG_DEF_SMETHOD(format_size, -1);
103
104
  }
@@ -1,9 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2003 Masahiro Sakai
5
- * Copyright (C) 2002 Masahiro Sakai
6
- * Kenichi Komiya
3
+ * Copyright (C) 2011-2024 Ruby-GNOME Project Team
7
4
  *
8
5
  * This library is free software; you can redistribute it and/or
9
6
  * modify it under the terms of the GNU Lesser General Public
@@ -23,143 +20,30 @@
23
20
 
24
21
  #include "rbgprivate.h"
25
22
 
26
- static ID id_and;
27
- static ID id_rshift;
28
- static ID id_lshift;
29
- static ID id_lt;
30
- static ID id_plus;
31
- static ID id_uminus;
32
- static ID id_abs;
33
- static VALUE max_PRUint32;
34
-
35
- typedef guint64 PRUint64;
36
- typedef gint64 PRInt64;
37
-
38
- #define LL_ZERO G_GINT64_CONSTANT(0)
39
- #define LL_UI2L(lhs,rhs) ((lhs)=(rhs))
40
- #define LL_L2UI(lhs,rhs) ((lhs)=(guint32)(rhs))
41
- #define LL_SHL(lhs,v1,v2) ((lhs)=(v1)<<(v2))
42
- #define LL_SHR(lhs,v1,v2) ((lhs)=(v1)>>(v2))
43
- #define LL_ADD(lhs,v1,v2) ((lhs)=(v1)+(v2))
44
- #define LL_NEG(lhs,rhs) ((lhs)=-(rhs))
45
- #define LL_CMP(v1,op,v2) ((v1) op (v2))
46
-
47
- /**********************************************************************/
48
- /*
49
- following is ripped from rbXPCOM-0.0.3
50
- http://www.ruby-lang.org/en/raa-list.rhtml?name=rbXPCOM
51
- Copyright (C) 2001 Kenichi Komiya <kom@mail1.accsnet.ne.jp>
52
- */
53
-
54
- static PRUint64
55
- RubyTo64BitInt(VALUE aRuby)
56
- {
57
- VALUE bitMask = max_PRUint32;
58
- VALUE lo = rb_funcall(aRuby, id_and, 1, bitMask);
59
- VALUE hi = rb_funcall(aRuby, id_rshift, 1, INT2FIX(32));
60
- PRUint64 result, hi64, lo64;
61
- LL_UI2L(hi64, NUM2UINT(hi));
62
- LL_UI2L(lo64, NUM2UINT(lo));
63
- LL_SHL(result, hi64, 32);
64
- LL_ADD(result, result, lo64);
65
- return result;
66
- }
67
-
68
-
69
- static inline PRUint64
70
- RubyToPRUint64(VALUE aRuby)
71
- {
72
- return RubyTo64BitInt(aRuby);
73
- }
74
-
75
-
76
- static PRInt64
77
- RubyToPRInt64(VALUE aRuby)
78
- {
79
- if(RVAL2CBOOL(rb_funcall(aRuby, id_lt, 1, INT2FIX(0))))
80
- {
81
- VALUE absRuby = rb_funcall(aRuby, id_abs, 0);
82
- PRInt64 result;
83
- LL_NEG(result, RubyTo64BitInt(absRuby));
84
- return result;
85
- } else
86
- return (PRInt64)RubyTo64BitInt(aRuby);
87
-
88
- }
89
-
90
- static VALUE
91
- RubyFrom64BitInt(PRUint64 aNative)
92
- {
93
- PRUint64 lo64, hi64;
94
- LL_L2UI(lo64, aNative);
95
- LL_SHR(hi64, aNative, 32);
96
- {
97
- VALUE lo = UINT2NUM(lo64);
98
- VALUE hi = UINT2NUM(hi64);
99
- VALUE hiRuby = rb_funcall(hi, id_lshift, 1, INT2FIX(32));
100
- return rb_funcall(hiRuby, id_plus, 1, lo);
101
- }
102
- }
103
-
104
- static inline VALUE
105
- PRUint64ToRuby(PRUint64 aNative)
106
- {
107
- return RubyFrom64BitInt(aNative);
108
- }
109
-
110
- static VALUE
111
- PRInt64ToRuby(PRInt64 aNative)
112
- {
113
- if(LL_CMP(aNative, <, LL_ZERO))
114
- {
115
- PRUint64 abs64;
116
- LL_NEG(abs64, aNative);
117
- return rb_funcall(RubyFrom64BitInt(abs64), id_uminus, 0);
118
- }
119
- else
120
- return RubyFrom64BitInt((PRUint64)aNative);
121
- }
122
-
123
- /* end of ripping */
124
- /**********************************************************************/
125
-
23
+ /* Deprecated. Use RB_LL2NUM() directly. */
126
24
  VALUE
127
25
  rbglib_int64_to_num(guint64 val)
128
26
  {
129
- return PRInt64ToRuby(val);
27
+ return RB_LL2NUM(val);
130
28
  }
131
29
 
30
+ /* Deprecated. Use RB_ULL2NUM() directly. */
132
31
  VALUE
133
32
  rbglib_uint64_to_num(guint64 val)
134
33
  {
135
- return PRUint64ToRuby(val);
34
+ return RB_ULL2NUM(val);
136
35
  }
137
36
 
37
+ /* Deprecated. Use RB_NUM2LL() directly. */
138
38
  gint64
139
39
  rbglib_num_to_int64(VALUE val)
140
40
  {
141
- return RubyToPRInt64(val);
41
+ return RB_NUM2LL(val);
142
42
  }
143
43
 
44
+ /* Deprecated. Use RB_NUM2ULL() directly. */
144
45
  guint64
145
46
  rbglib_num_to_uint64(VALUE val)
146
47
  {
147
- return RubyToPRUint64(val);
148
- }
149
-
150
- /**********************************************************************/
151
-
152
- void
153
- Init_glib_int64(void)
154
- {
155
- id_and = rb_intern("&");
156
- id_rshift = rb_intern(">>");
157
- id_lshift = rb_intern("<<");
158
- id_lt = rb_intern("<");
159
- id_plus = rb_intern("+");
160
- id_uminus = rb_intern("-@");
161
- id_abs = rb_intern("abs");
162
-
163
- rb_global_variable(&max_PRUint32);
164
- max_PRUint32 = UINT2NUM(0xffffffffL);
48
+ return RB_NUM2ULL(val);
165
49
  }
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2021 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 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
@@ -104,12 +104,6 @@ rg_poll(GPollFD *ufds, guint nfsd, gint timeout)
104
104
  return info.result;
105
105
  }
106
106
 
107
- static VALUE
108
- ruby_source_set_priority (G_GNUC_UNUSED VALUE self, G_GNUC_UNUSED VALUE priority)
109
- {
110
- return Qnil;
111
- }
112
-
113
107
  static void
114
108
  restore_poll_func(G_GNUC_UNUSED VALUE data)
115
109
  {
@@ -510,12 +504,9 @@ Init_glib_main_context(void)
510
504
 
511
505
  main_thread = g_thread_self();
512
506
 
513
- rbg_define_singleton_method(rbg_mGLib(), "set_ruby_thread_priority",
514
- ruby_source_set_priority, 1);
515
-
516
507
  mGLibSource = rb_const_get(rbg_mGLib(), rb_intern("Source"));
517
- rbg_define_singleton_method(mGLibSource, "remove", source_remove, 1);
518
- rbg_define_singleton_method(mGLibSource, "current", source_current_source, 0);
508
+ rb_define_singleton_method(mGLibSource, "remove", source_remove, 1);
509
+ rb_define_singleton_method(mGLibSource, "current", source_current_source, 0);
519
510
  /*
520
511
  id_poll_func = rb_intern("__poll_func__");
521
512
  */
@@ -540,15 +531,15 @@ Init_glib_main_context(void)
540
531
  RG_DEF_METHOD(add_poll, 2);
541
532
  RG_DEF_METHOD(remove_poll, 1);
542
533
  RG_DEF_SMETHOD(depth, 0);
543
- rbg_define_singleton_method(timeout, "source_new", timeout_source_new, 1);
544
- rbg_define_singleton_method(timeout, "source_new_seconds", timeout_source_new_seconds, 1);
545
- rbg_define_singleton_method(timeout, "add", timeout_add, -1);
546
- rbg_define_singleton_method(timeout, "add_seconds", timeout_add_seconds, -1);
547
- rbg_define_singleton_method(idle, "source_new", idle_source_new, 0);
548
- rbg_define_singleton_method(idle, "add", idle_add, -1);
549
-
550
- rbg_define_singleton_method(child_watch, "source_new", child_watch_source_new, 1);
551
- rbg_define_singleton_method(child_watch, "add", child_watch_add, 1);
534
+ rb_define_singleton_method(timeout, "source_new", timeout_source_new, 1);
535
+ rb_define_singleton_method(timeout, "source_new_seconds", timeout_source_new_seconds, 1);
536
+ rb_define_singleton_method(timeout, "add", timeout_add, -1);
537
+ rb_define_singleton_method(timeout, "add_seconds", timeout_add_seconds, -1);
538
+ rb_define_singleton_method(idle, "source_new", idle_source_new, 0);
539
+ rb_define_singleton_method(idle, "add", idle_add, -1);
540
+
541
+ rb_define_singleton_method(child_watch, "source_new", child_watch_source_new, 1);
542
+ rb_define_singleton_method(child_watch, "add", child_watch_add, 1);
552
543
 
553
544
  default_poll_func = g_main_context_get_poll_func(NULL);
554
545
  g_main_context_set_poll_func(NULL, rg_poll);
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2021 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 Ruby-GNOME Project Team
4
4
  * Copyright (C) 2006 Kouhei Sutou
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
@@ -187,36 +187,36 @@ Init_glib_unichar(void)
187
187
  {
188
188
  VALUE RG_TARGET_NAMESPACE = rb_define_module_under(rbg_mGLib(), "UniChar");
189
189
 
190
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "alnum?",
191
- rbglib_m_unichar_isalnum, 1);
192
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "alpha?",
193
- rbglib_m_unichar_isalpha, 1);
194
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "cntrl?",
195
- rbglib_m_unichar_iscntrl, 1);
196
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "digit?",
197
- rbglib_m_unichar_isdigit, 1);
198
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "graph?",
199
- rbglib_m_unichar_isgraph, 1);
200
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "lower?",
201
- rbglib_m_unichar_islower, 1);
202
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "print?",
203
- rbglib_m_unichar_isprint, 1);
204
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "punct?",
205
- rbglib_m_unichar_ispunct, 1);
206
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "space?",
207
- rbglib_m_unichar_isspace, 1);
208
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "upper?",
209
- rbglib_m_unichar_isupper, 1);
210
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "xdigit?",
211
- rbglib_m_unichar_isxdigit, 1);
212
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "title?",
213
- rbglib_m_unichar_istitle, 1);
214
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "defined?",
215
- rbglib_m_unichar_isdefined, 1);
216
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "wide?",
217
- rbglib_m_unichar_iswide, 1);
218
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "wide_cjk?",
219
- rbglib_m_unichar_iswide_cjk, 1);
190
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "alnum?",
191
+ rbglib_m_unichar_isalnum, 1);
192
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "alpha?",
193
+ rbglib_m_unichar_isalpha, 1);
194
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "cntrl?",
195
+ rbglib_m_unichar_iscntrl, 1);
196
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "digit?",
197
+ rbglib_m_unichar_isdigit, 1);
198
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "graph?",
199
+ rbglib_m_unichar_isgraph, 1);
200
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "lower?",
201
+ rbglib_m_unichar_islower, 1);
202
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "print?",
203
+ rbglib_m_unichar_isprint, 1);
204
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "punct?",
205
+ rbglib_m_unichar_ispunct, 1);
206
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "space?",
207
+ rbglib_m_unichar_isspace, 1);
208
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "upper?",
209
+ rbglib_m_unichar_isupper, 1);
210
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "xdigit?",
211
+ rbglib_m_unichar_isxdigit, 1);
212
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "title?",
213
+ rbglib_m_unichar_istitle, 1);
214
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "defined?",
215
+ rbglib_m_unichar_isdefined, 1);
216
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "wide?",
217
+ rbglib_m_unichar_iswide, 1);
218
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "wide_cjk?",
219
+ rbglib_m_unichar_iswide_cjk, 1);
220
220
 
221
221
  RG_DEF_SMETHOD(to_upper, 1);
222
222
  RG_DEF_SMETHOD(to_lower, 1);
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2021 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 Ruby-GNOME Project Team
4
4
  * Copyright (C) 2006 Kouhei Sutou
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
@@ -67,7 +67,7 @@ Init_glib_unicode(void)
67
67
 
68
68
  G_DEF_CLASS(G_TYPE_NORMALIZE_MODE, "NormalizeMode", rbg_mGLib());
69
69
 
70
- rbg_define_singleton_method(rbg_mGLib(), "charset", rbglib_m_charset, 0);
70
+ rb_define_singleton_method(rbg_mGLib(), "charset", rbglib_m_charset, 0);
71
71
 
72
72
  RG_DEF_SMETHOD(canonical_ordering, 1);
73
73
  }
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2004-2024 Ruby-GNOME Project Team
3
+ * Copyright (C) 2004-2025 Ruby-GNOME Project Team
4
4
  * Copyright (C) 2004 Pascal Terjan
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
@@ -308,7 +308,7 @@ Init_glib_utils(void)
308
308
  RG_DEF_SMETHOD(prgname, 0);
309
309
  RG_DEF_SMETHOD(set_prgname, 1);
310
310
  RG_DEF_SMETHOD(getenv, 1);
311
- RG_DEF_SMETHOD(setenv, 2);
311
+ RG_DEF_SMETHOD(setenv, 3);
312
312
  RG_DEF_SMETHOD(unsetenv, 1);
313
313
  RG_DEF_SMETHOD(listenv, 0);
314
314
  RG_DEF_SMETHOD(host_name, 0);
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2021 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 Ruby-GNOME Project Team
4
4
  * Copyright (C) 2006 Kouhei Sutou
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
@@ -96,12 +96,12 @@ Init_glib_win32(void)
96
96
  RG_DEF_SMETHOD(locale, 0);
97
97
  RG_DEF_SMETHOD(version, 0);
98
98
  /* Deprecated */
99
- rbg_define_singleton_method(rbg_mGLib(), "win32_locale", rbglib_m_win32_locale_deprecated, 0);
99
+ rb_define_singleton_method(rbg_mGLib(), "win32_locale", rbglib_m_win32_locale_deprecated, 0);
100
100
 
101
101
  RG_DEF_SMETHOD(locale_filename_from_utf8, 1);
102
102
  /* Deprecated */
103
- rbg_define_singleton_method(rbg_mGLib(), "win32_locale_filename_from_utf8",
104
- rbglib_m_win32_locale_filename_from_utf8_deprecated, 1);
103
+ rb_define_singleton_method(rbg_mGLib(), "win32_locale_filename_from_utf8",
104
+ rbglib_m_win32_locale_filename_from_utf8_deprecated, 1);
105
105
 
106
106
  RG_DEF_SMETHOD(get_package_installation_directory_of_module, -1);
107
107
  #endif
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2023 Ruby-GNOME Project Team
3
+ * Copyright (C) 2011-2025 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
@@ -319,13 +319,13 @@ Init_gobject_gboxed(void)
319
319
  rbgobj_register_r2g_func(G_TYPE_BOXED, boxed_from_ruby);
320
320
 
321
321
  rb_define_alloc_func(RG_TARGET_NAMESPACE, rbgobj_boxed_alloc_func);
322
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "gtype", generic_s_gtype, 0);
323
- rbg_define_singleton_method(RG_TARGET_NAMESPACE,
324
- "to_s",
325
- rbgutil_generic_s_to_s_gtype_name_fallback,
326
- 0);
322
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "gtype", generic_s_gtype, 0);
323
+ rb_define_singleton_method(RG_TARGET_NAMESPACE,
324
+ "to_s",
325
+ rbgutil_generic_s_to_s_gtype_name_fallback,
326
+ 0);
327
327
  RG_DEF_SALIAS("inspect", "to_s");
328
- rbg_define_method(RG_TARGET_NAMESPACE, "gtype", generic_gtype, 0);
328
+ rb_define_method(RG_TARGET_NAMESPACE, "gtype", generic_gtype, 0);
329
329
  RG_DEF_METHOD(initialize, 0);
330
330
  RG_DEF_METHOD(inspect, 0);
331
331
  RG_DEF_METHOD(initialize_copy, 1);