glib2 4.2.5 → 4.2.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: 1ce8e0b69eabe0515d6f899e3811fa77ac794481531500e84fdea9fb33b28fec
4
- data.tar.gz: 4ab29fea64953b54d7d903bef16ec0572276b4f892312f475b37af8eb70ef246
3
+ metadata.gz: e278dde163e8d497ede015df6d5b274379bfe750ac7ffd56da075f131788363d
4
+ data.tar.gz: 8eb2125a49ae54dab3551f626e3ed16cba35637782f0237094ec9408f3afe3eb
5
5
  SHA512:
6
- metadata.gz: 1af9b09699eeeff8fbce562c64be5c19514b4ce0d59a9d0ff7798b5c675215e54a853a7d6546b1f21aac122150256ed48714f2cd9b883f564a1a2d775367dce2
7
- data.tar.gz: '079135b962c74881c9a24e110dae2de86792281817321ff42ee96dfabe34741b1a815e386043de63c8b647c110cb5718a7a5a3268e65ca7af06ceca6daa3a346'
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/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
@@ -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
 
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 2
36
- #define RBGLIB_MICRO_VERSION 5
36
+ #define RBGLIB_MICRO_VERSION 6
37
37
 
38
38
  /* For Ruby < 3.0 */
39
39
  #ifndef RB_LL2NUM
@@ -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,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);
@@ -1,7 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011-2021 Ruby-GNOME Project Team
4
- * Copyright (C) 2004-2006 Ruby-GNOME Project Team
3
+ * Copyright (C) 2004-2025 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
@@ -417,8 +416,8 @@ Init_gobject_genums(void)
417
416
 
418
417
  RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_ENUM, "Enum", rbg_mGLib());
419
418
 
420
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "gtype", generic_s_gtype, 0);
421
- rbg_define_method(RG_TARGET_NAMESPACE, "gtype", generic_gtype, 0);
419
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "gtype", generic_s_gtype, 0);
420
+ rb_define_method(RG_TARGET_NAMESPACE, "gtype", generic_gtype, 0);
422
421
 
423
422
  RG_DEF_SMETHOD(range, 0);
424
423
  RG_DEF_SMETHOD(values, 0);
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2004-2023 Ruby-GNOME Project Team
3
+ * Copyright (C) 2004-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
@@ -546,13 +546,13 @@ Init_gobject_gflags(void)
546
546
 
547
547
  RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FLAGS, "Flags", rbg_mGLib());
548
548
 
549
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, "gtype", generic_s_gtype, 0);
550
- rbg_define_singleton_method(RG_TARGET_NAMESPACE,
551
- "to_s",
552
- rbgutil_generic_s_to_s_gtype_name_fallback,
553
- 0);
549
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, "gtype", generic_s_gtype, 0);
550
+ rb_define_singleton_method(RG_TARGET_NAMESPACE,
551
+ "to_s",
552
+ rbgutil_generic_s_to_s_gtype_name_fallback,
553
+ 0);
554
554
  RG_DEF_SALIAS("inspect", "to_s");
555
- rbg_define_method(RG_TARGET_NAMESPACE, "gtype", generic_gtype, 0);
555
+ rb_define_method(RG_TARGET_NAMESPACE, "gtype", generic_gtype, 0);
556
556
 
557
557
  RG_DEF_SMETHOD(mask, 0);
558
558
  RG_DEF_SMETHOD(values, 0);
@@ -567,7 +567,7 @@ Init_gobject_gflags(void)
567
567
  RG_DEF_METHOD(nick, 0);
568
568
 
569
569
  /*
570
- rbg_define_method(RG_TARGET_NAMESPACE, "inspect", flags_inspect, 0);
570
+ rb_define_method(RG_TARGET_NAMESPACE, "inspect", flags_inspect, 0);
571
571
  */
572
572
 
573
573
  RG_DEF_METHOD_OPERATOR("<=>", flags_compare, 1);
@@ -577,9 +577,9 @@ Init_gobject_gflags(void)
577
577
  RG_DEF_METHOD_OPERATOR(">", flags_gt, 1);
578
578
  RG_DEF_METHOD_OPERATOR("<", flags_lt, 1);
579
579
  RG_DEF_METHOD_OPERATOR("~", flags_not, 0);
580
- rbg_define_method(RG_TARGET_NAMESPACE, "&", flags_and, 1);
581
- rbg_define_method(RG_TARGET_NAMESPACE, "|", flags_or, 1);
582
- rbg_define_method(RG_TARGET_NAMESPACE, "^", flags_xor, 1);
580
+ rb_define_method(RG_TARGET_NAMESPACE, "&", flags_and, 1);
581
+ rb_define_method(RG_TARGET_NAMESPACE, "|", flags_or, 1);
582
+ rb_define_method(RG_TARGET_NAMESPACE, "^", flags_xor, 1);
583
583
  RG_DEF_METHOD_OPERATOR("-", flags_minus, 1);
584
584
 
585
585
  RG_DEF_METHOD_P(empty, 0);