glib2 3.0.7 → 3.0.8

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
  SHA1:
3
- metadata.gz: 4df9769488cb9e51decabad779c60ba6cfe58bfb
4
- data.tar.gz: d2e3b7edc284e8d87e96a720e256a0a42e85d275
3
+ metadata.gz: b227a9758d39dfe359af6c1c62fd1e80d6ea21e3
4
+ data.tar.gz: 05b7473ed8ec17f8e0b858fff2cadff344b0ca27
5
5
  SHA512:
6
- metadata.gz: c15f574616913089e963da6dc2876d75a043f047eb03f33d885369c98354735d279d8cc95c78890ec6b4c6f33b04cf4f686e10e3b1828b07e7eacdd3b09fa41c
7
- data.tar.gz: 2e338edeb4ecc1612faaa9fa170351695cb6412177c4f82a5938f1694bd62edc7d553060c68a041bb630de39c502f5b047222a9e2a003b9542d621c805344526
6
+ metadata.gz: 499ab40a274a334fb3121c98c07919dbd75bd6b0468cb777d7966c25ac156fee234d3befdddc8d4c58796661eedb0d903233978e59fe466cf96abc43e37c7ab7
7
+ data.tar.gz: 9ab7657fe78e454cb20305cffaf57e00d6643e2626566c6ed989e0a04c19f5f6282e453e9622569b79023c60803a54ab11cd2f9d9344df30c56946aa23d02117
data/Rakefile CHANGED
@@ -54,7 +54,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
54
54
  :name => "gettext",
55
55
  :download_site => :gnu,
56
56
  :label => "gettext-runtime",
57
- :version => "0.19.5",
57
+ :version => "0.19.7",
58
58
  :base_dir_in_package => "gettext-runtime",
59
59
  :windows => {
60
60
  :built_file => "bin/libintl-8.dll",
@@ -69,25 +69,37 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
69
69
  :built_file => "bin/libffi-6.dll",
70
70
  },
71
71
  },
72
+ {
73
+ :name => "pcre",
74
+ :download_base_url => "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre",
75
+ :label => "PCRE",
76
+ :version => "8.38",
77
+ :windows => {
78
+ :configure_args => [
79
+ "--enable-unicode-properties",
80
+ ],
81
+ :built_file => "bin/libpcre-1.dll",
82
+ },
83
+ },
72
84
  {
73
85
  :name => "glib",
74
86
  :download_site => :gnome,
75
87
  :label => "GLib",
76
- :version => "2.44.1",
88
+ :version => "2.48.0",
77
89
  :compression_method => "xz",
78
90
  :windows => {
79
91
  :need_autoreconf => true,
80
92
  :patches => [
81
- "glib-2.38.2-add-missing-exeext.diff",
93
+ "glib-2.48.0-add-missing-exeext.diff",
82
94
  ],
83
95
  :built_file => "bin/libglib-2.0-0.dll",
84
96
  },
85
97
  },
86
98
  {
87
99
  :name => "gmp",
88
- :download_base_url => "ftp://ftp.gmplib.org/pub/gmp-6.0.0",
100
+ :download_base_url => "ftp://ftp.gmplib.org/pub/gmp-6.1.0",
89
101
  :label => "GNU MP",
90
- :version => "6.0.0",
102
+ :version => "6.1.0",
91
103
  :compression_method => "xz",
92
104
  :windows => {
93
105
  :configure_args => [
@@ -101,17 +113,17 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
101
113
  :name => "nettle",
102
114
  :download_base_url => "http://www.lysator.liu.se/~nisse/archive",
103
115
  :label => "Nettle",
104
- :version => "3.1.1",
116
+ :version => "3.2",
105
117
  :windows => {
106
118
  :configure_args => [],
107
- :built_file => "bin/libnettle-6-1.dll",
119
+ :built_file => "bin/libnettle-6-2.dll",
108
120
  },
109
121
  },
110
122
  {
111
123
  :name => "libtasn1",
112
124
  :download_site => :gnu,
113
125
  :label => "Libtasn1",
114
- :version => "4.6",
126
+ :version => "4.7",
115
127
  :windows => {
116
128
  :built_file => "bin/libtasn1-6.dll",
117
129
  },
@@ -127,9 +139,9 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
127
139
  },
128
140
  {
129
141
  :name => "p11-kit",
130
- :download_base_url => "http://p11-glue.freedesktop.org/releases",
142
+ :download_base_url => "https://p11-glue.freedesktop.org/releases",
131
143
  :label => "p11-kit",
132
- :version => "0.23.1",
144
+ :version => "0.23.2",
133
145
  :windows => {
134
146
  :built_file => "bin/libp11-kit-0.dll",
135
147
  },
@@ -138,7 +150,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
138
150
  :name => "gnutls",
139
151
  :download_base_url => "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4",
140
152
  :label => "GnuTLS",
141
- :version => "3.4.4",
153
+ :version => "3.4.10",
142
154
  :compression_method => "xz",
143
155
  :windows => {
144
156
  :configure_args => [
@@ -156,7 +168,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
156
168
  :name => "glib-networking",
157
169
  :download_site => :gnome,
158
170
  :label => "glib-networking",
159
- :version => "2.44.0",
171
+ :version => "2.48.0",
160
172
  :compression_method => "xz",
161
173
  :windows => {
162
174
  :configure_args => [
@@ -17,6 +17,7 @@ require 'mkmf-gnome2'
17
17
  setup_windows(module_name, base_dir)
18
18
 
19
19
  unless required_pkg_config_package([package_id, 2, 12, 0],
20
+ :altlinux => "glib2-devel",
20
21
  :debian => "libglib2.0-dev",
21
22
  :redhat => "glib2-devel",
22
23
  :arch => "glib2",
@@ -69,8 +69,11 @@ EXPORTS
69
69
  rbg_rval_inspect
70
70
  rbg_string_value_ptr
71
71
  rbg_rval2cstr
72
+ rbg_rval2cstr_raw
72
73
  rbg_rval2cstr_ptr
73
74
  rbg_rval2cstr_accept_nil
75
+ rbg_rval2cstr_raw_accept_nil
76
+ rbg_rval2cstr_ptr_accept_nil
74
77
  rbg_rval2cstr_accept_symbol
75
78
  rbg_rval2cstr_accept_symbol_accept_nil
76
79
  rbg_rval2glibid
@@ -116,6 +119,7 @@ EXPORTS
116
119
  rbg_inspect
117
120
  rbg_interrupt_source_new
118
121
  rbg_name_to_nick
122
+ rbg_memzero
119
123
  rbgutil_id_module_eval DATA
120
124
  rbgutil_def_setters
121
125
  rbgutil_glist2ary
@@ -39,11 +39,45 @@ rbg_variant_to_ruby(GVariant *variant)
39
39
 
40
40
  if (g_variant_type_equal(type, G_VARIANT_TYPE_BOOLEAN)) {
41
41
  return CBOOL2RVAL(g_variant_get_boolean(variant));
42
- } else if (g_variant_type_equal(type, G_VARIANT_TYPE_STRING)) {
42
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_BYTE)) {
43
+ return UINT2NUM(g_variant_get_byte(variant));
44
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_INT16)) {
45
+ return INT2NUM(g_variant_get_int16(variant));
46
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_UINT16)) {
47
+ return UINT2NUM(g_variant_get_uint16(variant));
48
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_INT32)) {
49
+ return INT2NUM(g_variant_get_int32(variant));
50
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_UINT32)) {
51
+ return UINT2NUM(g_variant_get_uint32(variant));
52
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_INT64)) {
53
+ return rbglib_int64_to_num(g_variant_get_int64(variant));
54
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_UINT64)) {
55
+ return rbglib_uint64_to_num(g_variant_get_uint64(variant));
56
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_DOUBLE)) {
57
+ return rb_float_new(g_variant_get_double(variant));
58
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_STRING) ||
59
+ g_variant_type_equal(type, G_VARIANT_TYPE_OBJECT_PATH) ||
60
+ g_variant_type_equal(type, G_VARIANT_TYPE_SIGNATURE)) {
43
61
  const gchar *string;
44
62
  gsize string_length;
45
63
  string = g_variant_get_string(variant, &string_length);
46
64
  return CSTR2RVAL_LEN(string, string_length);
65
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_HANDLE)) {
66
+ return INT2NUM(g_variant_get_handle(variant));
67
+ } else if (g_variant_type_equal(type, G_VARIANT_TYPE_VARIANT)) {
68
+ GVariant *val = g_variant_get_variant(variant);
69
+ VALUE value = rbg_variant_to_ruby(val);
70
+ g_variant_unref(val);
71
+ return value;
72
+ } else if (g_variant_type_is_array(type)) {
73
+ gsize i, len = g_variant_n_children(variant);
74
+ VALUE ary = rb_ary_new2(len);
75
+ for (i = 0; i < len; i++) {
76
+ GVariant *val = g_variant_get_child_value(variant, i);
77
+ rb_ary_store(ary, i, rbg_variant_to_ruby(val));
78
+ g_variant_unref(val);
79
+ }
80
+ return ary;
47
81
  } else {
48
82
  rb_raise(rb_eNotImpError,
49
83
  "TODO: GVariant(%.*s) -> Ruby",
@@ -78,21 +112,138 @@ rg_variant_allocate(VALUE klass)
78
112
  return Data_Wrap_Struct(klass, NULL, rg_variant_free, NULL);
79
113
  }
80
114
 
81
- static VALUE
82
- rg_initialize(VALUE self, VALUE rb_value)
115
+ static GVariant *
116
+ rg_ruby_to_variant(VALUE rb_value, VALUE rb_variant_type)
83
117
  {
84
- GVariant *variant;
118
+ const GVariantType *variant_type;
119
+
120
+ if (NIL_P(rb_variant_type)) {
121
+ switch (rb_type(rb_value)) {
122
+ case RUBY_T_TRUE:
123
+ case RUBY_T_FALSE:
124
+ variant_type = G_VARIANT_TYPE_BOOLEAN;
125
+ break;
126
+ case RUBY_T_FIXNUM:
127
+ variant_type = G_VARIANT_TYPE_INT64;
128
+ break;
129
+ case RUBY_T_FLOAT:
130
+ variant_type = G_VARIANT_TYPE_DOUBLE;
131
+ break;
132
+ case RUBY_T_STRING:
133
+ variant_type = G_VARIANT_TYPE_STRING;
134
+ break;
135
+ case RUBY_T_ARRAY:
136
+ variant_type = G_VARIANT_TYPE_ARRAY;
137
+ break;
138
+ default:
139
+ rb_raise(rb_eNotImpError,
140
+ "TODO: Ruby -> GVariantType: %s",
141
+ RBG_INSPECT(rb_value));
142
+ break;
143
+ }
144
+ } else {
145
+ variant_type = RVAL2GVARIANTTYPE(rb_variant_type);
146
+ }
147
+
148
+ if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_BOOLEAN)) {
149
+ return g_variant_new_boolean(RVAL2CBOOL(rb_value));
150
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_BYTE)) {
151
+ return g_variant_new_byte(NUM2UINT(rb_value));
152
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_INT16)) {
153
+ return g_variant_new_int16(NUM2INT(rb_value));
154
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_UINT16)) {
155
+ return g_variant_new_uint16(NUM2UINT(rb_value));
156
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_INT32)) {
157
+ return g_variant_new_int32(NUM2INT(rb_value));
158
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_UINT32)) {
159
+ return g_variant_new_uint32(NUM2UINT(rb_value));
160
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_INT64)) {
161
+ return g_variant_new_int64(NUM2LONG(rb_value));
162
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_UINT64)) {
163
+ return g_variant_new_uint64(NUM2ULONG(rb_value));
164
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_HANDLE)) {
165
+ return g_variant_new_handle(NUM2INT(rb_value));
166
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_DOUBLE)) {
167
+ return g_variant_new_double(NUM2DBL(rb_value));
168
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_STRING)) {
169
+ return g_variant_new_string(RVAL2CSTR_ACCEPT_NIL(rb_value));
170
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_OBJECT_PATH)) {
171
+ return g_variant_new_object_path(RVAL2CSTR_ACCEPT_NIL(rb_value));
172
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_SIGNATURE)) {
173
+ return g_variant_new_signature(RVAL2CSTR_ACCEPT_NIL(rb_value));
174
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_VARIANT)) {
175
+ return g_variant_new_variant(rbg_variant_from_ruby(rb_value));
176
+ } else if (g_variant_type_equal(variant_type,
177
+ G_VARIANT_TYPE_STRING_ARRAY) ||
178
+ g_variant_type_equal(variant_type,
179
+ G_VARIANT_TYPE_OBJECT_PATH_ARRAY)) {
180
+ const gchar **strings;
181
+ gssize length;
182
+ if (NIL_P(rb_value)) {
183
+ strings = NULL;
184
+ length = 0;
185
+ } else {
186
+ gssize i;
187
+
188
+ length = RARRAY_LEN(rb_value);
189
+ strings = ALLOCA_N(const gchar *, length);
190
+ for (i = 0; i < length; i++) {
191
+ VALUE rb_string = RARRAY_PTR(rb_value)[i];
192
+ strings[i] = RVAL2CSTR_ACCEPT_NIL(rb_string);
193
+ }
194
+ }
195
+ if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_STRING_ARRAY)) {
196
+ return g_variant_new_strv(strings, length);
197
+ } else {
198
+ return g_variant_new_objv(strings, length);
199
+ }
200
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_ARRAY)) {
201
+ int i;
202
+ GVariantBuilder builder;
203
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
204
+ for (i = 0; i < RARRAY_LEN(rb_value); i++) {
205
+ GVariant *val = rg_ruby_to_variant(rb_ary_entry(rb_value, i), Qnil);
206
+ g_variant_builder_add_value(&builder, val);
207
+ }
208
+ return g_variant_builder_end(&builder);
209
+ } else if (g_variant_type_equal(variant_type, G_VARIANT_TYPE_BYTESTRING)) {
210
+ return g_variant_new_bytestring(RVAL2CSTR_RAW_ACCEPT_NIL(rb_value));
211
+ } else if (g_variant_type_equal(variant_type,
212
+ G_VARIANT_TYPE_BYTESTRING_ARRAY)) {
213
+ const gchar **strings;
214
+ gssize length;
215
+ if (NIL_P(rb_value)) {
216
+ strings = NULL;
217
+ length = 0;
218
+ } else {
219
+ gssize i;
85
220
 
86
- switch (rb_type(rb_value)) {
87
- case RUBY_T_STRING:
88
- variant = g_variant_new_string(RVAL2CSTR(rb_value));
89
- break;
90
- default:
221
+ length = RARRAY_LEN(rb_value);
222
+ strings = ALLOCA_N(const gchar *, length);
223
+ for (i = 0; i < length; i++) {
224
+ VALUE rb_string = RARRAY_PTR(rb_value)[i];
225
+ strings[i] = RVAL2CSTR_RAW_ACCEPT_NIL(rb_string);
226
+ }
227
+ }
228
+ return g_variant_new_bytestring_array(strings, length);
229
+ } else {
91
230
  rb_raise(rb_eNotImpError,
92
- "TODO: Ruby -> GVariant: %s",
231
+ "TODO: Ruby -> GVariant(%.*s): %s",
232
+ (int)g_variant_type_get_string_length(variant_type),
233
+ g_variant_type_peek_string(variant_type),
93
234
  RBG_INSPECT(rb_value));
94
- break;
95
235
  }
236
+ }
237
+
238
+ static VALUE
239
+ rg_initialize(int argc, VALUE *argv, VALUE self)
240
+ {
241
+ GVariant *variant;
242
+ VALUE rb_value;
243
+ VALUE rb_variant_type;
244
+
245
+ rb_scan_args(argc, argv, "11", &rb_value, &rb_variant_type);
246
+ variant = rg_ruby_to_variant(rb_value, rb_variant_type);
96
247
  g_variant_ref_sink(variant);
97
248
  DATA_PTR(self) = variant;
98
249
 
@@ -126,7 +277,7 @@ Init_glib_variant(void)
126
277
 
127
278
  rb_define_alloc_func(RG_TARGET_NAMESPACE, rg_variant_allocate);
128
279
 
129
- RG_DEF_METHOD(initialize, 1);
280
+ RG_DEF_METHOD(initialize, -1);
130
281
  RG_DEF_METHOD(value, 0);
131
282
  RG_DEF_METHOD(type, 0);
132
283
  }
@@ -43,14 +43,17 @@ rbg_rval2cstr(VALUE *str)
43
43
  }
44
44
 
45
45
  const gchar *
46
- rbg_rval2cstr_ptr(VALUE *str)
46
+ rbg_rval2cstr_raw(VALUE *str)
47
47
  {
48
48
  StringValue(*str);
49
49
 
50
- #ifdef HAVE_RUBY_ENCODING_H
51
- if (rb_enc_get(*str) != rb_utf8_encoding())
52
- *str = rb_str_export_to_enc(*str, rb_utf8_encoding());
53
- #endif
50
+ return StringValueCStr(*str);
51
+ }
52
+
53
+ const gchar *
54
+ rbg_rval2cstr_ptr(VALUE *str)
55
+ {
56
+ StringValue(*str);
54
57
 
55
58
  return RSTRING_PTR(*str);
56
59
  }
@@ -75,6 +78,18 @@ rbg_rval2cstr_accept_nil(VALUE *str)
75
78
  return NIL_P(*str) ? NULL : RVAL2CSTR(*str);
76
79
  }
77
80
 
81
+ const gchar *
82
+ rbg_rval2cstr_raw_accept_nil(VALUE *str)
83
+ {
84
+ return NIL_P(*str) ? NULL : RVAL2CSTR_RAW(*str);
85
+ }
86
+
87
+ const gchar *
88
+ rbg_rval2cstr_ptr_accept_nil(VALUE *str)
89
+ {
90
+ return NIL_P(*str) ? NULL : RVAL2CSTR_PTR(*str);
91
+ }
92
+
78
93
  /* TODO: How do we deal with encodings? */
79
94
  const gchar *
80
95
  rbg_rval2cstr_accept_symbol(volatile VALUE *value)
@@ -879,11 +894,17 @@ rbg_scan_options (VALUE options, ...)
879
894
  VALUE *value;
880
895
  va_list args;
881
896
 
882
- options = rbg_check_hash_type(options);
883
897
  if (NIL_P(options)) {
884
898
  options = rb_hash_new();
885
- } else if (options == original_options) {
886
- options = rb_funcall(options, rb_intern("dup"), 0);
899
+ } else {
900
+ options = rbg_check_hash_type(options);
901
+ if (options == original_options) {
902
+ options = rb_funcall(options, rb_intern("dup"), 0);
903
+ } else if (NIL_P(options)) {
904
+ rb_raise(rb_eArgError,
905
+ "options must be Hash or nil: %+" PRIsVALUE,
906
+ original_options);
907
+ }
887
908
  }
888
909
 
889
910
  available_keys = rb_ary_new();
@@ -1170,4 +1191,6 @@ union GDoubleIEEE754;
1170
1191
  Init_glib_bookmark_file();
1171
1192
  Init_glib_variant_type();
1172
1193
  Init_glib_variant();
1194
+ Init_glib_regex();
1195
+ Init_glib_matchinfo();
1173
1196
  }
@@ -36,7 +36,15 @@ extern "C" {
36
36
 
37
37
  #define RBGLIB_MAJOR_VERSION 3
38
38
  #define RBGLIB_MINOR_VERSION 0
39
- #define RBGLIB_MICRO_VERSION 7
39
+ #define RBGLIB_MICRO_VERSION 8
40
+
41
+ #ifndef RB_ZALLOC
42
+ # ifdef ZALLOC
43
+ # define RB_ZALLOC(type) ZALLOC(type)
44
+ # else
45
+ # define RB_ZALLOC(type) rbg_memzero(ALLOC(type), sizeof(type))
46
+ # endif
47
+ #endif
40
48
 
41
49
  #ifndef RSTRING_PTR
42
50
  # define RSTRING_PTR(s) (RSTRING(s)->ptr)
@@ -71,8 +79,11 @@ extern "C" {
71
79
  #define RBG_INSPECT(object) (rbg_rval_inspect(object))
72
80
 
73
81
  #define RVAL2CSTR(v) (rbg_rval2cstr(&(v)))
82
+ #define RVAL2CSTR_RAW(v) (rbg_rval2cstr_raw(&(v)))
74
83
  #define RVAL2CSTR_PTR(v) (rbg_rval2cstr_ptr(&(v)))
75
84
  #define RVAL2CSTR_ACCEPT_NIL(v) (rbg_rval2cstr_accept_nil(&(v)))
85
+ #define RVAL2CSTR_RAW_ACCEPT_NIL(v) (rbg_rval2cstr_raw_accept_nil(&(v)))
86
+ #define RVAL2CSTR_PTR_ACCEPT_NIL(v) (rbg_rval2cstr_ptr_accept_nil(&(v)))
76
87
  #define RVAL2CSTR2(v) (RVAL2CSTR_ACCEPT_NIL(v))
77
88
  #define RVAL2CSTR_ACCEPT_SYMBOL(v) (rbg_rval2cstr_accept_symbol(&(v)))
78
89
  #define RVAL2CSTR_ACCEPT_SYMBOL_ACCEPT_NIL(v) (rbg_rval2cstr_accept_symbol_accept_nil(&(v)))
@@ -147,8 +158,11 @@ extern const gchar *rbg_rval_inspect(VALUE object);
147
158
 
148
159
  extern gchar* rbg_string_value_ptr(volatile VALUE* ptr); /* no longer used */
149
160
  extern const gchar *rbg_rval2cstr(VALUE *str);
161
+ extern const gchar *rbg_rval2cstr_raw(VALUE *str);
150
162
  extern const gchar *rbg_rval2cstr_ptr(VALUE *str);
151
163
  extern const gchar *rbg_rval2cstr_accept_nil(VALUE *str);
164
+ extern const gchar *rbg_rval2cstr_raw_accept_nil(VALUE *str);
165
+ extern const gchar *rbg_rval2cstr_ptr_accept_nil(VALUE *str);
152
166
  extern const gchar *rbg_rval2cstr_accept_symbol(volatile VALUE *value);
153
167
  extern const gchar *rbg_rval2cstr_accept_symbol_accept_nil(volatile VALUE *value);
154
168
  extern const gchar *rbg_rval2glibid(volatile VALUE *value, volatile VALUE *buf, gboolean accept_nil);