glib2 0.90.7-x86-mingw32 → 0.90.8-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +68 -0
- data/ext/glib2/rbglib.c +51 -15
- data/ext/glib2/rbglib.h +10 -2
- data/ext/glib2/rbglib_bookmarkfile.c +37 -74
- data/ext/glib2/rbglib_completion.c +8 -16
- data/ext/glib2/rbglib_convert.c +8 -18
- data/ext/glib2/rbglib_error.c +2 -8
- data/ext/glib2/rbglib_i18n.c +1 -2
- data/ext/glib2/rbglib_iochannel.c +81 -127
- data/ext/glib2/rbglib_keyfile.c +38 -86
- data/ext/glib2/rbglib_maincontext.c +29 -64
- data/ext/glib2/rbglib_mainloop.c +4 -8
- data/ext/glib2/rbglib_messages.c +7 -17
- data/ext/glib2/rbglib_pollfd.c +7 -14
- data/ext/glib2/rbglib_shell.c +3 -6
- data/ext/glib2/rbglib_source.c +14 -28
- data/ext/glib2/rbglib_spawn.c +7 -14
- data/ext/glib2/rbglib_threads.c +2 -4
- data/ext/glib2/rbglib_timer.c +7 -14
- data/ext/glib2/rbglib_unicode.c +45 -16
- data/ext/glib2/rbglib_utils.c +25 -50
- data/ext/glib2/rbglib_win32.c +10 -17
- data/ext/glib2/rbgobj_boxed.c +9 -21
- data/ext/glib2/rbgobj_closure.c +5 -11
- data/ext/glib2/rbgobj_enums.c +1 -2
- data/ext/glib2/rbgobj_object.c +23 -59
- data/ext/glib2/rbgobj_param.c +7 -15
- data/ext/glib2/rbgobj_signal.c +25 -65
- data/ext/glib2/rbgobj_type.c +36 -81
- data/ext/glib2/rbgobj_typeinstance.c +3 -6
- data/ext/glib2/rbgobj_typeinterface.c +3 -6
- data/ext/glib2/rbgobj_typemodule.c +4 -8
- data/ext/glib2/rbgobj_typeplugin.c +2 -4
- data/ext/glib2/rbgobj_valuetypes.c +7 -15
- data/ext/glib2/rbgobject.c +8 -18
- data/ext/glib2/rbgobject.h +3 -0
- data/ext/glib2/rbgprivate.h +0 -1
- data/ext/glib2/rbgutil.c +3 -6
- data/lib/1.8/glib2.so +0 -0
- data/lib/1.9/glib2.so +0 -0
- data/lib/gnome2-raketask.rb +1 -0
- data/lib/mkmf-gnome2.rb +12 -9
- data/test-unit/History.txt +43 -1
- data/test-unit/Manifest.txt +1 -1
- data/test-unit/html/index.html +62 -24
- data/test-unit/html/index.html.ja +54 -25
- data/test-unit/html/test-unit.css +3 -3
- data/test-unit/lib/test/unit/assertions.rb +489 -36
- data/test-unit/lib/test/unit/autorunner.rb +40 -0
- data/test-unit/lib/test/unit/collector.rb +6 -4
- data/test-unit/lib/test/unit/collector/load.rb +48 -5
- data/test-unit/lib/test/unit/collector/xml.rb +250 -0
- data/test-unit/lib/test/unit/error.rb +4 -3
- data/test-unit/lib/test/unit/fixture.rb +12 -3
- data/test-unit/lib/test/unit/runner/xml.rb +15 -0
- data/test-unit/lib/test/unit/testcase.rb +48 -16
- data/test-unit/lib/test/unit/testresult.rb +6 -2
- data/test-unit/lib/test/unit/testsuite.rb +24 -2
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +65 -28
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +11 -2
- data/test-unit/lib/test/unit/ui/xml/testrunner.rb +224 -0
- data/test-unit/lib/test/unit/version.rb +1 -1
- data/test-unit/test/run-test.rb +7 -0
- data/test-unit/test/{test_assertions.rb → test-assertions.rb} +708 -77
- data/test-unit/test/test-fixture.rb +37 -0
- data/test-unit/test/test-testcase.rb +24 -7
- data/test-unit/test/test_testsuite.rb +19 -11
- data/test/test_iochannel.rb +9 -9
- data/test/test_unicode.rb +44 -31
- metadata +8 -5
data/ext/glib2/rbglib_unicode.c
CHANGED
@@ -12,12 +12,38 @@
|
|
12
12
|
#include "rbgprivate.h"
|
13
13
|
#include "rbglib.h"
|
14
14
|
|
15
|
+
static VALUE
|
16
|
+
rbg_ucs4_to_rval_len(const gchar* ucs4, gsize len)
|
17
|
+
{
|
18
|
+
const gchar *ucs4_encoding;
|
19
|
+
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
20
|
+
ucs4_encoding = "UTF-32LE";
|
21
|
+
#else
|
22
|
+
ucs4_encoding = "UTF-32BE";
|
23
|
+
#endif
|
24
|
+
|
25
|
+
return CSTR2RVAL_LEN_ENC(ucs4, len, ucs4_encoding);
|
26
|
+
}
|
27
|
+
|
28
|
+
static VALUE
|
29
|
+
rbg_utf16_to_rval_len(const gchar* utf16, gsize len)
|
30
|
+
{
|
31
|
+
const gchar *utf16_encoding;
|
32
|
+
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
33
|
+
utf16_encoding = "UTF-16LE";
|
34
|
+
#else
|
35
|
+
utf16_encoding = "UTF-16BE";
|
36
|
+
#endif
|
37
|
+
|
38
|
+
return CSTR2RVAL_LEN_ENC(utf16, len, utf16_encoding);
|
39
|
+
}
|
40
|
+
|
15
41
|
static VALUE
|
16
42
|
rbglib_m_charset(VALUE self)
|
17
43
|
{
|
18
44
|
const char *charset;
|
19
45
|
g_get_charset(&charset);
|
20
|
-
return
|
46
|
+
return CSTR2RVAL(charset);
|
21
47
|
}
|
22
48
|
|
23
49
|
#define DEF_IS_UNICHAR(name) \
|
@@ -103,7 +129,7 @@ rbglib_m_unicode_canonical_ordering(VALUE self, VALUE rb_ucs4)
|
|
103
129
|
len = RSTRING_LEN(rb_ucs4);
|
104
130
|
ucs4 = g_memdup(original_str, len);
|
105
131
|
g_unicode_canonical_ordering(ucs4, len);
|
106
|
-
normalized_ucs4 =
|
132
|
+
normalized_ucs4 = rbg_ucs4_to_rval_len((const char *)ucs4, len);
|
107
133
|
g_free(ucs4);
|
108
134
|
return normalized_ucs4;
|
109
135
|
}
|
@@ -116,7 +142,8 @@ rbglib_m_unicode_canonical_decomposition(VALUE self, VALUE unichar)
|
|
116
142
|
gsize len;
|
117
143
|
|
118
144
|
ucs4 = g_unicode_canonical_decomposition(NUM2UINT(unichar), &len);
|
119
|
-
normalized_ucs4 =
|
145
|
+
normalized_ucs4 = rbg_ucs4_to_rval_len((const char *)ucs4,
|
146
|
+
len * sizeof(gunichar));
|
120
147
|
g_free(ucs4);
|
121
148
|
return normalized_ucs4;
|
122
149
|
}
|
@@ -203,7 +230,7 @@ rbglib_m_utf8_strreverse(VALUE self, VALUE rb_utf8)
|
|
203
230
|
|
204
231
|
utf8 = StringValueCStr(rb_utf8);
|
205
232
|
reversed_utf8 = g_utf8_strreverse(utf8, RSTRING_LEN(rb_utf8));
|
206
|
-
result =
|
233
|
+
result = CSTR2RVAL(reversed_utf8);
|
207
234
|
g_free(reversed_utf8);
|
208
235
|
return result;
|
209
236
|
}
|
@@ -224,7 +251,7 @@ rbglib_m_utf8_strup(VALUE self, VALUE rb_utf8)
|
|
224
251
|
|
225
252
|
utf8 = StringValueCStr(rb_utf8);
|
226
253
|
upcased_utf8 = g_utf8_strup(utf8, RSTRING_LEN(rb_utf8));
|
227
|
-
result =
|
254
|
+
result = CSTR2RVAL(upcased_utf8);
|
228
255
|
g_free(upcased_utf8);
|
229
256
|
return result;
|
230
257
|
}
|
@@ -237,7 +264,7 @@ rbglib_m_utf8_strdown(VALUE self, VALUE rb_utf8)
|
|
237
264
|
|
238
265
|
utf8 = StringValueCStr(rb_utf8);
|
239
266
|
downcased_utf8 = g_utf8_strdown(utf8, RSTRING_LEN(rb_utf8));
|
240
|
-
result =
|
267
|
+
result = CSTR2RVAL(downcased_utf8);
|
241
268
|
g_free(downcased_utf8);
|
242
269
|
return result;
|
243
270
|
}
|
@@ -250,7 +277,7 @@ rbglib_m_utf8_casefold(VALUE self, VALUE rb_utf8)
|
|
250
277
|
|
251
278
|
utf8 = StringValueCStr(rb_utf8);
|
252
279
|
casefolded_utf8 = g_utf8_casefold(utf8, RSTRING_LEN(rb_utf8));
|
253
|
-
result =
|
280
|
+
result = CSTR2RVAL(casefolded_utf8);
|
254
281
|
g_free(casefolded_utf8);
|
255
282
|
return result;
|
256
283
|
}
|
@@ -269,7 +296,7 @@ rbglib_m_utf8_normalize(int argc, VALUE *argv, VALUE self)
|
|
269
296
|
|
270
297
|
utf8 = StringValueCStr(rb_utf8);
|
271
298
|
normalized_utf8 = g_utf8_normalize(utf8, RSTRING_LEN(rb_utf8), mode);
|
272
|
-
result =
|
299
|
+
result = CSTR2RVAL(normalized_utf8);
|
273
300
|
g_free(normalized_utf8);
|
274
301
|
return result;
|
275
302
|
}
|
@@ -299,7 +326,7 @@ rbglib_m_utf8_collate_key(int argc, VALUE *argv, VALUE self)
|
|
299
326
|
#endif
|
300
327
|
key = g_utf8_collate_key(utf8, len);
|
301
328
|
|
302
|
-
result =
|
329
|
+
result = CSTR2RVAL(key);
|
303
330
|
g_free(key);
|
304
331
|
return result;
|
305
332
|
}
|
@@ -321,7 +348,8 @@ rbglib_m_utf8_to_utf16(VALUE self, VALUE rb_utf8)
|
|
321
348
|
if (error)
|
322
349
|
RAISE_GERROR(error);
|
323
350
|
|
324
|
-
result =
|
351
|
+
result = rbg_utf16_to_rval_len((char *)utf16,
|
352
|
+
items_written * sizeof(*utf16));
|
325
353
|
g_free(utf16);
|
326
354
|
return result;
|
327
355
|
}
|
@@ -349,7 +377,7 @@ rbglib_m_utf8_to_ucs4(int argc, VALUE *argv, VALUE self)
|
|
349
377
|
RAISE_GERROR(error);
|
350
378
|
}
|
351
379
|
|
352
|
-
result =
|
380
|
+
result = rbg_ucs4_to_rval_len((char *)ucs4, items_written * sizeof(*ucs4));
|
353
381
|
g_free(ucs4);
|
354
382
|
return result;
|
355
383
|
}
|
@@ -371,7 +399,7 @@ rbglib_m_utf16_to_ucs4(VALUE self, VALUE rb_utf16)
|
|
371
399
|
if (error)
|
372
400
|
RAISE_GERROR(error);
|
373
401
|
|
374
|
-
result =
|
402
|
+
result = rbg_ucs4_to_rval_len((char *)ucs4, items_written * sizeof(*ucs4));
|
375
403
|
g_free(ucs4);
|
376
404
|
return result;
|
377
405
|
}
|
@@ -393,7 +421,7 @@ rbglib_m_utf16_to_utf8(VALUE self, VALUE rb_utf16)
|
|
393
421
|
if (error)
|
394
422
|
RAISE_GERROR(error);
|
395
423
|
|
396
|
-
result =
|
424
|
+
result = CSTR2RVAL_LEN(utf8, items_written * sizeof(*utf8));
|
397
425
|
g_free(utf8);
|
398
426
|
return result;
|
399
427
|
}
|
@@ -415,7 +443,8 @@ rbglib_m_ucs4_to_utf16(VALUE self, VALUE rb_ucs4)
|
|
415
443
|
if (error)
|
416
444
|
RAISE_GERROR(error);
|
417
445
|
|
418
|
-
result =
|
446
|
+
result = rbg_utf16_to_rval_len((char *)utf16,
|
447
|
+
items_written * sizeof(*utf16));
|
419
448
|
g_free(utf16);
|
420
449
|
return result;
|
421
450
|
}
|
@@ -437,7 +466,7 @@ rbglib_m_ucs4_to_utf8(VALUE self, VALUE rb_ucs4)
|
|
437
466
|
if (error)
|
438
467
|
RAISE_GERROR(error);
|
439
468
|
|
440
|
-
result =
|
469
|
+
result = CSTR2RVAL_LEN(utf8, items_written);
|
441
470
|
g_free(utf8);
|
442
471
|
return result;
|
443
472
|
}
|
@@ -449,7 +478,7 @@ rbglib_m_unichar_to_utf8(VALUE self, VALUE unichar)
|
|
449
478
|
gint len;
|
450
479
|
|
451
480
|
len = g_unichar_to_utf8(NUM2UINT(unichar), utf8);
|
452
|
-
return
|
481
|
+
return CSTR2RVAL_LEN(utf8, len);
|
453
482
|
}
|
454
483
|
|
455
484
|
void
|
data/ext/glib2/rbglib_utils.c
CHANGED
@@ -15,15 +15,13 @@
|
|
15
15
|
|
16
16
|
#if GLIB_CHECK_VERSION(2,2,0)
|
17
17
|
static VALUE
|
18
|
-
rbglib_m_application_name(self)
|
19
|
-
VALUE self;
|
18
|
+
rbglib_m_application_name(VALUE self)
|
20
19
|
{
|
21
20
|
return CSTR2RVAL(g_get_application_name());
|
22
21
|
}
|
23
22
|
|
24
23
|
static VALUE
|
25
|
-
rbglib_m_set_application_name(self, application_name)
|
26
|
-
VALUE self, application_name;
|
24
|
+
rbglib_m_set_application_name(VALUE self, VALUE application_name)
|
27
25
|
{
|
28
26
|
g_set_prgname(NIL_P(application_name) ? NULL : RVAL2CSTR(application_name));
|
29
27
|
return self;
|
@@ -31,31 +29,27 @@ rbglib_m_set_application_name(self, application_name)
|
|
31
29
|
#endif
|
32
30
|
|
33
31
|
static VALUE
|
34
|
-
rbglib_m_prgname(self)
|
35
|
-
VALUE self;
|
32
|
+
rbglib_m_prgname(VALUE self)
|
36
33
|
{
|
37
34
|
return CSTR2RVAL(g_get_prgname());
|
38
35
|
}
|
39
36
|
|
40
37
|
static VALUE
|
41
|
-
rbglib_m_set_prgname(self, prgname)
|
42
|
-
VALUE self, prgname;
|
38
|
+
rbglib_m_set_prgname(VALUE self, VALUE prgname)
|
43
39
|
{
|
44
40
|
g_set_prgname(NIL_P(prgname) ? NULL : RVAL2CSTR(prgname));
|
45
41
|
return self;
|
46
42
|
}
|
47
43
|
|
48
44
|
static VALUE
|
49
|
-
rbglib_m_env(self, variable)
|
50
|
-
VALUE self, variable;
|
45
|
+
rbglib_m_env(VALUE self, VALUE variable)
|
51
46
|
{
|
52
47
|
return CSTR2RVAL(g_getenv(RVAL2CSTR(variable)));
|
53
48
|
}
|
54
49
|
|
55
50
|
#if GLIB_CHECK_VERSION(2,4,0)
|
56
51
|
static VALUE
|
57
|
-
rbglib_m_setenv(self, variable, value, overwrite)
|
58
|
-
VALUE self, variable, value, overwrite;
|
52
|
+
rbglib_m_setenv(VALUE self, VALUE variable, VALUE value, VALUE overwrite)
|
59
53
|
{
|
60
54
|
return CBOOL2RVAL(g_setenv(RVAL2CSTR(variable),
|
61
55
|
NIL_P(value) ? NULL : RVAL2CSTR(value),
|
@@ -63,8 +57,7 @@ rbglib_m_setenv(self, variable, value, overwrite)
|
|
63
57
|
}
|
64
58
|
|
65
59
|
static VALUE
|
66
|
-
rbglib_m_unsetenv(self, variable)
|
67
|
-
VALUE self, variable;
|
60
|
+
rbglib_m_unsetenv(VALUE self, VALUE variable)
|
68
61
|
{
|
69
62
|
g_unsetenv(RVAL2CSTR(variable));
|
70
63
|
return self;
|
@@ -74,8 +67,7 @@ rbglib_m_unsetenv(self, variable)
|
|
74
67
|
#if GLIB_CHECK_VERSION(2,8,0)
|
75
68
|
#if HAVE_G_LISTENV
|
76
69
|
static VALUE
|
77
|
-
rbglib_m_listenv(self)
|
78
|
-
VALUE self;
|
70
|
+
rbglib_m_listenv(VALUE self)
|
79
71
|
{
|
80
72
|
gchar** c_list;
|
81
73
|
gchar** c_var;
|
@@ -91,23 +83,20 @@ rbglib_m_listenv(self)
|
|
91
83
|
#endif
|
92
84
|
|
93
85
|
static VALUE
|
94
|
-
rbglib_m_host_name(self)
|
95
|
-
VALUE self;
|
86
|
+
rbglib_m_host_name(VALUE self)
|
96
87
|
{
|
97
88
|
return CSTR2RVAL(g_get_host_name());
|
98
89
|
}
|
99
90
|
#endif
|
100
91
|
|
101
92
|
static VALUE
|
102
|
-
rbglib_m_user_name(self)
|
103
|
-
VALUE self;
|
93
|
+
rbglib_m_user_name(VALUE self)
|
104
94
|
{
|
105
95
|
return CSTR2RVAL(g_get_user_name());
|
106
96
|
}
|
107
97
|
|
108
98
|
static VALUE
|
109
|
-
rbglib_m_real_name(self)
|
110
|
-
VALUE self;
|
99
|
+
rbglib_m_real_name(VALUE self)
|
111
100
|
{
|
112
101
|
return CSTR2RVAL(g_get_real_name());
|
113
102
|
}
|
@@ -167,22 +156,19 @@ rbglib_m_get_user_special_dir(VALUE self, VALUE directory)
|
|
167
156
|
#endif
|
168
157
|
|
169
158
|
static VALUE
|
170
|
-
rbglib_m_home_dir(self)
|
171
|
-
VALUE self;
|
159
|
+
rbglib_m_home_dir(VALUE self)
|
172
160
|
{
|
173
161
|
return CSTR2RVAL(g_get_home_dir());
|
174
162
|
}
|
175
163
|
|
176
164
|
static VALUE
|
177
|
-
rbglib_m_tmp_dir(self)
|
178
|
-
VALUE self;
|
165
|
+
rbglib_m_tmp_dir(VALUE self)
|
179
166
|
{
|
180
167
|
return CSTR2RVAL(g_get_tmp_dir());
|
181
168
|
}
|
182
169
|
|
183
170
|
static VALUE
|
184
|
-
rbglib_m_current_dir(self)
|
185
|
-
VALUE self;
|
171
|
+
rbglib_m_current_dir(VALUE self)
|
186
172
|
{
|
187
173
|
gchar* dir = g_get_current_dir();
|
188
174
|
VALUE ret = CSTR2RVAL(dir);
|
@@ -191,29 +177,25 @@ rbglib_m_current_dir(self)
|
|
191
177
|
}
|
192
178
|
|
193
179
|
static VALUE
|
194
|
-
rbglib_m_path_is_absolute(self, fname)
|
195
|
-
VALUE self, fname;
|
180
|
+
rbglib_m_path_is_absolute(VALUE self, VALUE fname)
|
196
181
|
{
|
197
182
|
return CBOOL2RVAL(g_path_is_absolute(RVAL2CSTR(fname)));
|
198
183
|
}
|
199
184
|
|
200
185
|
static VALUE
|
201
|
-
rbglib_m_path_skip_root(self, fname)
|
202
|
-
VALUE self, fname;
|
186
|
+
rbglib_m_path_skip_root(VALUE self, VALUE fname)
|
203
187
|
{
|
204
188
|
return CSTR2RVAL(g_path_skip_root(RVAL2CSTR(fname)));
|
205
189
|
}
|
206
190
|
|
207
191
|
static VALUE
|
208
|
-
rbglib_m_path_get_basename(self, fname)
|
209
|
-
VALUE self, fname;
|
192
|
+
rbglib_m_path_get_basename(VALUE self, VALUE fname)
|
210
193
|
{
|
211
194
|
return CSTR2RVAL(g_path_get_basename(RVAL2CSTR(fname)));
|
212
195
|
}
|
213
196
|
|
214
197
|
static VALUE
|
215
|
-
rbglib_m_path_get_dirname(self, fname)
|
216
|
-
VALUE self, fname;
|
198
|
+
rbglib_m_path_get_dirname(VALUE self, VALUE fname)
|
217
199
|
{
|
218
200
|
return CSTR2RVAL(g_path_get_dirname(RVAL2CSTR(fname)));
|
219
201
|
}
|
@@ -231,8 +213,7 @@ gchar* g_build_pathv (const gchar *separator,
|
|
231
213
|
*/
|
232
214
|
|
233
215
|
static VALUE
|
234
|
-
rbglib_m_find_program_in_path(self, program)
|
235
|
-
VALUE self, program;
|
216
|
+
rbglib_m_find_program_in_path(VALUE self, VALUE program)
|
236
217
|
{
|
237
218
|
gchar* path = g_find_program_in_path(RVAL2CSTR(program));
|
238
219
|
VALUE ret = CSTR2RVAL(path);
|
@@ -241,29 +222,25 @@ rbglib_m_find_program_in_path(self, program)
|
|
241
222
|
}
|
242
223
|
|
243
224
|
static VALUE
|
244
|
-
rbglib_m_bit_nth_lsf(self, mask, nth_bit)
|
245
|
-
VALUE self, mask, nth_bit;
|
225
|
+
rbglib_m_bit_nth_lsf(VALUE self, VALUE mask, VALUE nth_bit)
|
246
226
|
{
|
247
227
|
return INT2NUM(g_bit_nth_lsf(NUM2ULONG(mask), NUM2INT(nth_bit)));
|
248
228
|
}
|
249
229
|
|
250
230
|
static VALUE
|
251
|
-
rbglib_m_bit_nth_msf(self, mask, nth_bit)
|
252
|
-
VALUE self, mask, nth_bit;
|
231
|
+
rbglib_m_bit_nth_msf(VALUE self, VALUE mask, VALUE nth_bit)
|
253
232
|
{
|
254
233
|
return INT2NUM(g_bit_nth_msf(NUM2ULONG(mask), NUM2INT(nth_bit)));
|
255
234
|
}
|
256
235
|
|
257
236
|
static VALUE
|
258
|
-
rbglib_m_bit_storage(self, number)
|
259
|
-
VALUE self, number;
|
237
|
+
rbglib_m_bit_storage(VALUE self, VALUE number)
|
260
238
|
{
|
261
239
|
return UINT2NUM(g_bit_storage(NUM2ULONG(number)));
|
262
240
|
}
|
263
241
|
|
264
242
|
static VALUE
|
265
|
-
rbglib_m_spaced_primes_closest(self, num)
|
266
|
-
VALUE self, num;
|
243
|
+
rbglib_m_spaced_primes_closest(VALUE self, VALUE num)
|
267
244
|
{
|
268
245
|
return UINT2NUM(g_spaced_primes_closest(NUM2UINT(num)));
|
269
246
|
}
|
@@ -274,8 +251,7 @@ void g_atexit (GVoidFunc func);
|
|
274
251
|
*/
|
275
252
|
|
276
253
|
static VALUE
|
277
|
-
rbglib_m_parse_debug_string(self, string, keys)
|
278
|
-
VALUE self, string, keys;
|
254
|
+
rbglib_m_parse_debug_string(VALUE self, VALUE string, VALUE keys)
|
279
255
|
{
|
280
256
|
gint i, nkeys;
|
281
257
|
VALUE ary, ret;
|
@@ -310,8 +286,7 @@ void g_nullify_pointer (gpointer *nullify_location);
|
|
310
286
|
*/
|
311
287
|
|
312
288
|
static VALUE
|
313
|
-
rbglib_m_check_version(self, major, minor, micro)
|
314
|
-
VALUE self, major, minor, micro;
|
289
|
+
rbglib_m_check_version(VALUE self, VALUE major, VALUE minor, VALUE micro)
|
315
290
|
{
|
316
291
|
return CBOOL2RVAL(glib_major_version > NUM2UINT(major) ||
|
317
292
|
(glib_major_version == NUM2UINT(major) &&
|
data/ext/glib2/rbglib_win32.c
CHANGED
@@ -16,38 +16,33 @@
|
|
16
16
|
|
17
17
|
#ifdef G_OS_WIN32
|
18
18
|
static VALUE
|
19
|
-
rbglib_m_win32_error_message(self, error)
|
20
|
-
VALUE self, error;
|
19
|
+
rbglib_m_win32_error_message(VALUE self, VALUE error)
|
21
20
|
{
|
22
21
|
return CSTR2RVAL_FREE(g_win32_error_message(NUM2INT(error)));
|
23
22
|
}
|
24
23
|
|
25
24
|
static VALUE
|
26
|
-
rbglib_m_win32_locale(self)
|
27
|
-
VALUE self;
|
25
|
+
rbglib_m_win32_locale(VALUE self)
|
28
26
|
{
|
29
27
|
return CSTR2RVAL_FREE(g_win32_getlocale());
|
30
28
|
}
|
31
29
|
|
32
30
|
static VALUE
|
33
|
-
rbglib_m_win32_locale_deprecated(self)
|
34
|
-
VALUE self;
|
31
|
+
rbglib_m_win32_locale_deprecated(VALUE self)
|
35
32
|
{
|
36
33
|
rb_warn("GLib.win32_locale() is deprecated. Use GLib::Win32.locale instead");
|
37
34
|
return rbglib_m_win32_locale(self);
|
38
35
|
}
|
39
36
|
|
40
37
|
static VALUE
|
41
|
-
rbglib_m_win32_get_package_installation_directory(self, package, dll_name)
|
42
|
-
VALUE self, package, dll_name;
|
38
|
+
rbglib_m_win32_get_package_installation_directory(VALUE self, VALUE package, VALUE dll_name)
|
43
39
|
{
|
44
40
|
return CSTR2RVAL_FREE(g_win32_get_package_installation_directory(RVAL2CSTR(package),
|
45
41
|
RVAL2CSTR(dll_name)));
|
46
42
|
}
|
47
43
|
|
48
44
|
static VALUE
|
49
|
-
rbglib_m_get_package_installation_subdirectory(self, package, dll_name, subdir)
|
50
|
-
VALUE self, package, dll_name, subdir;
|
45
|
+
rbglib_m_get_package_installation_subdirectory(VALUE self, VALUE package, VALUE dll_name, VALUE subdir)
|
51
46
|
{
|
52
47
|
return CSTR2RVAL_FREE(g_win32_get_package_installation_subdirectory(RVAL2CSTR(package),
|
53
48
|
RVAL2CSTR(dll_name),
|
@@ -56,8 +51,7 @@ rbglib_m_get_package_installation_subdirectory(self, package, dll_name, subdir)
|
|
56
51
|
|
57
52
|
#if GLIB_CHECK_VERSION(2,6,0)
|
58
53
|
static VALUE
|
59
|
-
rbglib_m_get_windows_version(self)
|
60
|
-
VALUE self;
|
54
|
+
rbglib_m_get_windows_version(VALUE self)
|
61
55
|
{
|
62
56
|
return UINT2NUM(g_win32_get_windows_version());
|
63
57
|
}
|
@@ -65,18 +59,17 @@ rbglib_m_get_windows_version(self)
|
|
65
59
|
|
66
60
|
#if GLIB_CHECK_VERSION(2,8,0)
|
67
61
|
static VALUE
|
68
|
-
rbglib_m_win32_locale_filename_from_utf8(self, utf8_filename)
|
69
|
-
VALUE self, utf8_filename;
|
62
|
+
rbglib_m_win32_locale_filename_from_utf8(VALUE self, VALUE utf8_filename)
|
70
63
|
{
|
71
64
|
return CSTR2RVAL_FREE(g_win32_locale_filename_from_utf8(RVAL2CSTR(utf8_filename)));
|
72
65
|
}
|
73
66
|
|
74
67
|
static VALUE
|
75
|
-
rbglib_m_win32_locale_filename_from_utf8_deprecated(self
|
76
|
-
|
68
|
+
rbglib_m_win32_locale_filename_from_utf8_deprecated(VALUE self,
|
69
|
+
VALUE utf8_filename)
|
77
70
|
{
|
78
71
|
rb_warn("GLib.win32_locale_filename_from_utf8() is deprecated. Use GLib::Win32.locale_filename_from_utf8 instead");
|
79
|
-
return rbglib_m_win32_locale_filename_from_utf8(self);
|
72
|
+
return rbglib_m_win32_locale_filename_from_utf8(self, utf8_filename);
|
80
73
|
}
|
81
74
|
|
82
75
|
#endif
|