glib2 1.1.2-x86-mingw32 → 1.1.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/ext/glib2/rbglib.c CHANGED
@@ -914,7 +914,7 @@ Init_mem()
914
914
  #endif
915
915
 
916
916
  static VALUE
917
- rg_m_os_win32_p(G_GNUC_UNUSED VALUE self)
917
+ rg_s_os_win32_p(G_GNUC_UNUSED VALUE self)
918
918
  {
919
919
  #ifdef G_OS_WIN32
920
920
  return Qtrue;
@@ -924,7 +924,7 @@ rg_m_os_win32_p(G_GNUC_UNUSED VALUE self)
924
924
  }
925
925
 
926
926
  static VALUE
927
- rg_m_os_beos_p(G_GNUC_UNUSED VALUE self)
927
+ rg_s_os_beos_p(G_GNUC_UNUSED VALUE self)
928
928
  {
929
929
  #ifdef G_OS_BEOS
930
930
  return Qtrue;
@@ -934,7 +934,7 @@ rg_m_os_beos_p(G_GNUC_UNUSED VALUE self)
934
934
  }
935
935
 
936
936
  static VALUE
937
- rg_m_os_unix_p(G_GNUC_UNUSED VALUE self)
937
+ rg_s_os_unix_p(G_GNUC_UNUSED VALUE self)
938
938
  {
939
939
  #ifdef G_OS_UNIX
940
940
  return Qtrue;
@@ -1024,9 +1024,9 @@ Init_glib2(void)
1024
1024
  rb_define_const(RG_TARGET_NAMESPACE, "MAXDOUBLE", DBL2NUM(G_MAXDOUBLE));
1025
1025
 
1026
1026
  /* Standard Macros */
1027
- RG_DEF_MODFUNC_P(os_win32, 0);
1028
- RG_DEF_MODFUNC_P(os_beos, 0);
1029
- RG_DEF_MODFUNC_P(os_unix, 0);
1027
+ RG_DEF_SMETHOD_P(os_win32, 0);
1028
+ RG_DEF_SMETHOD_P(os_beos, 0);
1029
+ RG_DEF_SMETHOD_P(os_unix, 0);
1030
1030
 
1031
1031
  rb_define_const(RG_TARGET_NAMESPACE, "DIR_SEPARATOR", CSTR2RVAL(G_DIR_SEPARATOR_S));
1032
1032
  rb_define_const(RG_TARGET_NAMESPACE, "SEARCHPATH_SEPARATOR", CSTR2RVAL(G_SEARCHPATH_SEPARATOR_S));
@@ -1123,7 +1123,4 @@ union GDoubleIEEE754;
1123
1123
  Init_glib_unichar();
1124
1124
  Init_glib_keyfile();
1125
1125
  Init_glib_bookmark_file();
1126
-
1127
- /* This is called here once. */
1128
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
1129
1126
  }
data/ext/glib2/rbglib.h CHANGED
@@ -35,7 +35,7 @@ extern "C" {
35
35
 
36
36
  #define RBGLIB_MAJOR_VERSION 1
37
37
  #define RBGLIB_MINOR_VERSION 1
38
- #define RBGLIB_MICRO_VERSION 2
38
+ #define RBGLIB_MICRO_VERSION 3
39
39
 
40
40
  #ifndef RSTRING_PTR
41
41
  # define RSTRING_PTR(s) (RSTRING(s)->ptr)
@@ -26,7 +26,7 @@
26
26
  #define RG_TARGET_NAMESPACE mGLib
27
27
 
28
28
  static VALUE
29
- rg_m_convert(G_GNUC_UNUSED VALUE self, VALUE str, VALUE to, VALUE from)
29
+ rg_s_convert(G_GNUC_UNUSED VALUE self, VALUE str, VALUE to, VALUE from)
30
30
  {
31
31
  GError *err = NULL;
32
32
  gchar* ret;
@@ -46,7 +46,7 @@ rg_m_convert(G_GNUC_UNUSED VALUE self, VALUE str, VALUE to, VALUE from)
46
46
  }
47
47
 
48
48
  static VALUE
49
- rg_m_locale_to_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
49
+ rg_s_locale_to_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
50
50
  {
51
51
  GError *err = NULL;
52
52
  VALUE s = Qnil;
@@ -65,7 +65,7 @@ rg_m_locale_to_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
65
65
  }
66
66
 
67
67
  static VALUE
68
- rg_m_locale_from_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
68
+ rg_s_locale_from_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
69
69
  {
70
70
  GError *err = NULL;
71
71
  VALUE s = Qnil;
@@ -84,7 +84,7 @@ rg_m_locale_from_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
84
84
  }
85
85
 
86
86
  static VALUE
87
- rg_m_filename_to_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
87
+ rg_s_filename_to_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
88
88
  {
89
89
  GError *err = NULL;
90
90
  VALUE s = Qnil;
@@ -103,7 +103,7 @@ rg_m_filename_to_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
103
103
  }
104
104
 
105
105
  static VALUE
106
- rg_m_filename_from_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
106
+ rg_s_filename_from_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
107
107
  {
108
108
  GError *err = NULL;
109
109
  VALUE s = Qnil;
@@ -122,7 +122,7 @@ rg_m_filename_from_utf8(G_GNUC_UNUSED VALUE self, VALUE str)
122
122
  }
123
123
 
124
124
  static VALUE
125
- rg_m_filename_to_uri(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
125
+ rg_s_filename_to_uri(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
126
126
  {
127
127
  VALUE filename, hostname, s;
128
128
  GError *err = NULL;
@@ -142,7 +142,7 @@ rg_m_filename_to_uri(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
142
142
  }
143
143
 
144
144
  static VALUE
145
- rg_m_filename_from_uri(G_GNUC_UNUSED VALUE self, VALUE str)
145
+ rg_s_filename_from_uri(G_GNUC_UNUSED VALUE self, VALUE str)
146
146
  {
147
147
  GError *err = NULL;
148
148
  VALUE s;
@@ -161,7 +161,7 @@ rg_m_filename_from_uri(G_GNUC_UNUSED VALUE self, VALUE str)
161
161
  }
162
162
 
163
163
  static VALUE
164
- rg_m_utf8_validate(G_GNUC_UNUSED VALUE self, VALUE str)
164
+ rg_s_utf8_validate(G_GNUC_UNUSED VALUE self, VALUE str)
165
165
  {
166
166
  rb_warning("GLib.utf8_validate is deprecated. Use GLib::UTF8.validate instead.");
167
167
  StringValue(str);
@@ -183,15 +183,15 @@ Init_glib_convert(void)
183
183
  /* glib/gunicode.h */
184
184
  /* just for backward compatibility.
185
185
  Use GLib::UTF8.validate instead. */
186
- RG_DEF_MODFUNC(utf8_validate, 1);
186
+ RG_DEF_SMETHOD(utf8_validate, 1);
187
187
 
188
188
  /* glib/gconvert.h */
189
- RG_DEF_MODFUNC(convert, 3);
190
- RG_DEF_MODFUNC(locale_to_utf8, 1);
191
- RG_DEF_MODFUNC(locale_from_utf8, 1);
192
- RG_DEF_MODFUNC(filename_to_utf8, 1);
193
- RG_DEF_MODFUNC(filename_from_utf8, 1);
194
-
195
- RG_DEF_MODFUNC(filename_to_uri, -1);
196
- RG_DEF_MODFUNC(filename_from_uri, 1);
189
+ RG_DEF_SMETHOD(convert, 3);
190
+ RG_DEF_SMETHOD(locale_to_utf8, 1);
191
+ RG_DEF_SMETHOD(locale_from_utf8, 1);
192
+ RG_DEF_SMETHOD(filename_to_utf8, 1);
193
+ RG_DEF_SMETHOD(filename_from_utf8, 1);
194
+
195
+ RG_DEF_SMETHOD(filename_to_uri, -1);
196
+ RG_DEF_SMETHOD(filename_from_uri, 1);
197
197
  }
@@ -88,7 +88,7 @@ Init_glib_fileutils(void)
88
88
  rb_define_const(RG_TARGET_NAMESPACE, "FAILED", INT2NUM(G_FILE_ERROR_FAILED));
89
89
 
90
90
  #if GLIB_CHECK_VERSION(2, 16, 0)
91
- rb_define_module_function(mGLib, "format_size_for_display",
91
+ rbg_define_singleton_method(mGLib, "format_size_for_display",
92
92
  rbglib_m_format_size_for_display, 1);
93
93
  #endif
94
94
  }
@@ -28,7 +28,7 @@
28
28
 
29
29
  #if GLIB_CHECK_VERSION(2,6,0)
30
30
  static VALUE
31
- rg_m_language_names(G_GNUC_UNUSED VALUE self)
31
+ rg_s_language_names(G_GNUC_UNUSED VALUE self)
32
32
  {
33
33
  return STRV2RVAL((const gchar **)g_get_language_names());
34
34
  }
@@ -39,6 +39,6 @@ Init_glib_i18n(void)
39
39
  {
40
40
  /* glib/gi18n.h */
41
41
  #if GLIB_CHECK_VERSION(2,6,0)
42
- RG_DEF_MODFUNC(language_names, 0);
42
+ RG_DEF_SMETHOD(language_names, 0);
43
43
  #endif
44
44
  }
@@ -787,8 +787,6 @@ Init_glib_io_channel(void)
787
787
  RG_DEF_METHOD(encoding, 0);
788
788
  RG_DEF_METHOD(set_encoding, 1);
789
789
 
790
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
791
-
792
790
  /* GSeekType */
793
791
  rb_define_const(RG_TARGET_NAMESPACE, "SEEK_CUR", INT2NUM(G_SEEK_CUR));
794
792
  rb_define_const(RG_TARGET_NAMESPACE, "SEEK_SET", INT2NUM(G_SEEK_SET));
@@ -94,7 +94,7 @@ rg_poll(GPollFD *ufds, guint nfsd, gint timeout)
94
94
  }
95
95
 
96
96
  static VALUE
97
- ruby_source_set_priority (VALUE self, VALUE priority)
97
+ ruby_source_set_priority (G_GNUC_UNUSED VALUE self, G_GNUC_UNUSED VALUE priority)
98
98
  {
99
99
  return Qnil;
100
100
  }
@@ -689,7 +689,7 @@ rg_remove_poll(VALUE self, VALUE fd)
689
689
 
690
690
  #ifdef HAVE_G_MAIN_DEPTH
691
691
  static VALUE
692
- rg_s_depth(VALUE self)
692
+ rg_s_depth(G_GNUC_UNUSED VALUE self)
693
693
  {
694
694
  return INT2NUM(g_main_depth());
695
695
  }
@@ -854,15 +854,13 @@ Init_glib_main_context(void)
854
854
  id__callbacks__ = rb_intern("__callbacks__");
855
855
  callbacks_table = g_hash_table_new(NULL, NULL);
856
856
 
857
- rb_define_singleton_method(mGLib, "set_ruby_thread_priority",
858
- ruby_source_set_priority, 1);
859
- rb_define_singleton_method(mGLib, "ruby_thread_priority=",
857
+ rbg_define_singleton_method(mGLib, "set_ruby_thread_priority",
860
858
  ruby_source_set_priority, 1);
861
859
 
862
860
  mGLibSource = rb_const_get(mGLib, rb_intern("Source"));
863
- rb_define_singleton_method(mGLibSource, "remove", source_remove, 1);
861
+ rbg_define_singleton_method(mGLibSource, "remove", source_remove, 1);
864
862
  #if GLIB_CHECK_VERSION(2,12,0)
865
- rb_define_singleton_method(mGLibSource, "current", source_current_source, 0);
863
+ rbg_define_singleton_method(mGLibSource, "current", source_current_source, 0);
866
864
  #endif
867
865
  /*
868
866
  id_poll_func = rb_intern("__poll_func__");
@@ -892,21 +890,21 @@ Init_glib_main_context(void)
892
890
  #ifdef HAVE_G_MAIN_DEPTH
893
891
  RG_DEF_SMETHOD(depth, 0);
894
892
  #endif
895
- rb_define_module_function(timeout, "source_new", timeout_source_new, 1);
893
+ rbg_define_singleton_method(timeout, "source_new", timeout_source_new, 1);
896
894
  #if GLIB_CHECK_VERSION(2,14,0)
897
- rb_define_module_function(timeout, "source_new_seconds", timeout_source_new_seconds, 1);
895
+ rbg_define_singleton_method(timeout, "source_new_seconds", timeout_source_new_seconds, 1);
898
896
  #endif
899
- rb_define_module_function(timeout, "add", timeout_add, -1);
897
+ rbg_define_singleton_method(timeout, "add", timeout_add, -1);
900
898
  #if GLIB_CHECK_VERSION(2,14,0)
901
- rb_define_module_function(timeout, "add_seconds", timeout_add_seconds, -1);
899
+ rbg_define_singleton_method(timeout, "add_seconds", timeout_add_seconds, -1);
902
900
  #endif
903
- rb_define_module_function(idle, "source_new", idle_source_new, 0);
904
- rb_define_module_function(idle, "add", idle_add, -1);
905
- rb_define_module_function(idle, "remove", idle_remove, 1);
901
+ rbg_define_singleton_method(idle, "source_new", idle_source_new, 0);
902
+ rbg_define_singleton_method(idle, "add", idle_add, -1);
903
+ rbg_define_singleton_method(idle, "remove", idle_remove, 1);
906
904
 
907
905
  #if GLIB_CHECK_VERSION(2,4,0)
908
- rb_define_module_function(child_watch, "source_new", child_watch_source_new, 1);
909
- rb_define_module_function(child_watch, "add", child_watch_add, 1);
906
+ rbg_define_singleton_method(child_watch, "source_new", child_watch_source_new, 1);
907
+ rbg_define_singleton_method(child_watch, "add", child_watch_add, 1);
910
908
  #endif
911
909
 
912
910
  default_poll_func = g_main_context_get_poll_func(NULL);
@@ -35,7 +35,6 @@
35
35
  #define RG_TARGET_NAMESPACE mLog
36
36
 
37
37
  static VALUE rbglib_log_handler_procs;
38
- static ID id_call;
39
38
  static gboolean log_canceled;
40
39
 
41
40
  static const gchar *
@@ -73,14 +72,14 @@ rbglib_log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gcha
73
72
 
74
73
  /* Use Internal only */
75
74
  static VALUE
76
- rg_m_cancel_handler(G_GNUC_UNUSED VALUE self)
75
+ rg_s_cancel_handler(G_GNUC_UNUSED VALUE self)
77
76
  {
78
77
  log_canceled = TRUE;
79
78
  return Qnil;
80
79
  }
81
80
 
82
81
  static VALUE
83
- rg_m_set_handler(VALUE self, VALUE domain, VALUE levels)
82
+ rg_s_set_handler(VALUE self, VALUE domain, VALUE levels)
84
83
  {
85
84
  guint handler_id = g_log_set_handler(RVAL2CSTR_ACCEPT_NIL(domain),
86
85
  NUM2INT(levels),
@@ -89,7 +88,7 @@ rg_m_set_handler(VALUE self, VALUE domain, VALUE levels)
89
88
  }
90
89
 
91
90
  static VALUE
92
- rg_m_remove_handler(VALUE self, VALUE domain, VALUE handler_id)
91
+ rg_s_remove_handler(VALUE self, VALUE domain, VALUE handler_id)
93
92
  {
94
93
  g_log_remove_handler(RVAL2CSTR_ACCEPT_NIL(domain),
95
94
  NUM2UINT(handler_id));
@@ -98,20 +97,20 @@ rg_m_remove_handler(VALUE self, VALUE domain, VALUE handler_id)
98
97
  }
99
98
 
100
99
  static VALUE
101
- rg_m_set_always_fatal(G_GNUC_UNUSED VALUE self, VALUE fatal_mask)
100
+ rg_s_set_always_fatal(G_GNUC_UNUSED VALUE self, VALUE fatal_mask)
102
101
  {
103
102
  return INT2NUM(g_log_set_always_fatal(NUM2INT(fatal_mask)));
104
103
  }
105
104
 
106
105
  static VALUE
107
- rg_m_set_fatal_mask(G_GNUC_UNUSED VALUE self, VALUE domain, VALUE fatal_mask)
106
+ rg_s_set_fatal_mask(G_GNUC_UNUSED VALUE self, VALUE domain, VALUE fatal_mask)
108
107
  {
109
108
  return INT2NUM(g_log_set_fatal_mask(RVAL2CSTR_ACCEPT_NIL(domain),
110
109
  NUM2INT(fatal_mask)));
111
110
  }
112
111
 
113
112
  static VALUE
114
- rg_m_log(G_GNUC_UNUSED VALUE self, VALUE domain, VALUE level, VALUE str)
113
+ rg_s_log(G_GNUC_UNUSED VALUE self, VALUE domain, VALUE level, VALUE str)
115
114
  {
116
115
  g_log(RVAL2CSTR_ACCEPT_NIL(domain), NUM2INT(level), "%s", RVAL2CSTR(str));
117
116
  return Qnil;
@@ -122,17 +121,16 @@ Init_glib_messages(void)
122
121
  {
123
122
  VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGLib, "Log");
124
123
 
125
- id_call = rb_intern("call");
126
124
  log_canceled = FALSE;
127
125
 
128
126
  rb_global_variable(&rbglib_log_handler_procs);
129
127
  rbglib_log_handler_procs = rb_hash_new();
130
- RG_DEF_MODFUNC(set_handler, 2);
131
- RG_DEF_MODFUNC(remove_handler, 2);
132
- RG_DEF_MODFUNC(cancel_handler, 0);
133
- RG_DEF_MODFUNC(set_always_fatal, 1);
134
- RG_DEF_MODFUNC(set_fatal_mask, 2);
135
- RG_DEF_MODFUNC(log, 3);
128
+ RG_DEF_SMETHOD(set_handler, 2);
129
+ RG_DEF_SMETHOD(remove_handler, 2);
130
+ RG_DEF_SMETHOD(cancel_handler, 0);
131
+ RG_DEF_SMETHOD(set_always_fatal, 1);
132
+ RG_DEF_SMETHOD(set_fatal_mask, 2);
133
+ RG_DEF_SMETHOD(log, 3);
136
134
 
137
135
  rb_define_const(RG_TARGET_NAMESPACE, "FATAL_MASK", INT2NUM(G_LOG_FATAL_MASK));
138
136
  rb_define_const(RG_TARGET_NAMESPACE, "LEVEL_USER_SHIFT", INT2NUM(G_LOG_LEVEL_USER_SHIFT));
@@ -109,7 +109,4 @@ Init_glib_poll_fd(void)
109
109
  RG_DEF_METHOD(events, 0);
110
110
  RG_DEF_METHOD(set_revents, 1);
111
111
  RG_DEF_METHOD(revents, 0);
112
-
113
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
114
-
115
112
  }
@@ -24,7 +24,7 @@
24
24
  #define RG_TARGET_NAMESPACE mShell
25
25
 
26
26
  static VALUE
27
- rg_m_parse(G_GNUC_UNUSED VALUE self, VALUE command_line)
27
+ rg_s_parse(G_GNUC_UNUSED VALUE self, VALUE command_line)
28
28
  {
29
29
  gint argc;
30
30
  gchar **argv;
@@ -37,13 +37,13 @@ rg_m_parse(G_GNUC_UNUSED VALUE self, VALUE command_line)
37
37
  }
38
38
 
39
39
  static VALUE
40
- rg_m_quote(G_GNUC_UNUSED VALUE self, VALUE unquoted_string)
40
+ rg_s_quote(G_GNUC_UNUSED VALUE self, VALUE unquoted_string)
41
41
  {
42
42
  return CSTR2RVAL_FREE(g_shell_quote(RVAL2CSTR(unquoted_string)));
43
43
  }
44
44
 
45
45
  static VALUE
46
- rg_m_unquote(G_GNUC_UNUSED VALUE self, VALUE quoted_string)
46
+ rg_s_unquote(G_GNUC_UNUSED VALUE self, VALUE quoted_string)
47
47
  {
48
48
  GError *error = NULL;
49
49
  gchar *str = g_shell_unquote(RVAL2CSTR(quoted_string), &error);
@@ -58,7 +58,7 @@ Init_glib_shell(void)
58
58
  {
59
59
  VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGLib, "Shell");
60
60
 
61
- RG_DEF_MODFUNC(parse, 1);
62
- RG_DEF_MODFUNC(quote, 1);
63
- RG_DEF_MODFUNC(unquote, 1);
61
+ RG_DEF_SMETHOD(parse, 1);
62
+ RG_DEF_SMETHOD(quote, 1);
63
+ RG_DEF_SMETHOD(unquote, 1);
64
64
  }
@@ -184,6 +184,4 @@ Init_glib_source(void)
184
184
  RG_DEF_METHOD(current_time, 0);
185
185
 
186
186
  /* GLib::Source.remove is moved to rbglib_maincontext.c */
187
-
188
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
189
187
  }
@@ -37,7 +37,7 @@ child_setup(gpointer func)
37
37
  }
38
38
 
39
39
  static VALUE
40
- rg_m_async_with_pipes(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
40
+ rg_s_async_with_pipes(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
41
41
  {
42
42
  GError *err = NULL;
43
43
  gboolean ret;
@@ -73,7 +73,7 @@ rg_m_async_with_pipes(VALUE self, VALUE working_directory, VALUE argv, VALUE env
73
73
  }
74
74
 
75
75
  static VALUE
76
- rg_m_async(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
76
+ rg_s_async(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
77
77
  {
78
78
  GError *err = NULL;
79
79
  gboolean ret;
@@ -102,7 +102,7 @@ rg_m_async(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE fl
102
102
  }
103
103
 
104
104
  static VALUE
105
- rg_m_sync(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
105
+ rg_s_sync(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
106
106
  {
107
107
  GError *err = NULL;
108
108
  gboolean ret;
@@ -153,7 +153,7 @@ rg_m_sync(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE fla
153
153
  }
154
154
 
155
155
  static VALUE
156
- rg_m_command_line_sync(G_GNUC_UNUSED VALUE self, VALUE str)
156
+ rg_s_command_line_sync(G_GNUC_UNUSED VALUE self, VALUE str)
157
157
  {
158
158
  GError *err = NULL;
159
159
  const gchar *command_line;
@@ -190,7 +190,7 @@ rg_m_command_line_sync(G_GNUC_UNUSED VALUE self, VALUE str)
190
190
  }
191
191
 
192
192
  static VALUE
193
- rg_m_command_line_async(G_GNUC_UNUSED VALUE self, VALUE str)
193
+ rg_s_command_line_async(G_GNUC_UNUSED VALUE self, VALUE str)
194
194
  {
195
195
  GError *err = NULL;
196
196
  const gchar *command_line;
@@ -209,7 +209,7 @@ rg_m_command_line_async(G_GNUC_UNUSED VALUE self, VALUE str)
209
209
  #define RVAL2GPID(value) ((GPid)NUM2INT(pid))
210
210
 
211
211
  static VALUE
212
- rg_m_close_pid(VALUE self, VALUE pid)
212
+ rg_s_close_pid(G_GNUC_UNUSED VALUE self, VALUE pid)
213
213
  {
214
214
  g_spawn_close_pid(RVAL2GPID(pid));
215
215
  return Qnil;
@@ -226,13 +226,13 @@ Init_glib_spawn(void)
226
226
  id_new = rb_intern("new");
227
227
 
228
228
  /* glib/gspawn.h */
229
- RG_DEF_MODFUNC(async_with_pipes, 4);
230
- RG_DEF_MODFUNC(async, 4);
231
- RG_DEF_MODFUNC(sync, 4);
232
- RG_DEF_MODFUNC(command_line_sync, 1);
233
- RG_DEF_MODFUNC(command_line_async, 1);
229
+ RG_DEF_SMETHOD(async_with_pipes, 4);
230
+ RG_DEF_SMETHOD(async, 4);
231
+ RG_DEF_SMETHOD(sync, 4);
232
+ RG_DEF_SMETHOD(command_line_sync, 1);
233
+ RG_DEF_SMETHOD(command_line_async, 1);
234
234
  #ifdef HAVE_G_SPAWN_CLOSE_PID
235
- RG_DEF_MODFUNC(close_pid, 1);
235
+ RG_DEF_SMETHOD(close_pid, 1);
236
236
  #endif
237
237
 
238
238
  rb_define_const(RG_TARGET_NAMESPACE, "LEAVE_DESCRIPTORS_OPEN", INT2NUM(G_SPAWN_LEAVE_DESCRIPTORS_OPEN));