gio2 1.0.0-x86-mingw32 → 1.0.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,7 +1,30 @@
1
+ 2011-09-16 Nikolai Weibull <now@bitwi.se>
2
+
3
+ * lib/gio2.rb: Remove unused variable.
4
+ * ext/gio2/gthemedicon.c: Fix argument number for
5
+ GLib::ThemedIcon#initialize.
6
+
7
+ 2011-09-15 Nikolai Weibull <now@bitwi.se>
8
+
9
+ * ext/gio2/gsocket.c: Use G_REPLACE_GET_PROPERTY().
10
+
11
+ 2011-09-12 Nikolai Weibull <now@bitwi.se>
12
+
13
+ * ext/gio2/gio2.h: Fix RVAL2GSOCKETPROTOCOL and RVAL2GSOCKETTYPE
14
+ * ext/gio2/gsocket.c: Fix #local_address and #remote_address
15
+ property-overriding methods
16
+ * ext/gio2/gvolume.c: Name doubly-named #mount method
17
+ #mount/#get_mount.
18
+
19
+ 2011-09-09 Nikolai Weibull <now@bitwi.se>
20
+
21
+ * ext/gio2/gio2.h: Fix RVAL2GMOUNTMOUNTFLAGS.
22
+
1
23
  2011-01-30 Kouhei Sutou <kou@cozmixng.org>
2
24
 
3
25
  * Rakefile, ext/gio2/extconf.rb: share depended packages
4
26
  vendor/local/.
27
+ * ext/gio2/*.c: Fix all RVAL2CSTR calls.
5
28
 
6
29
  2011-01-29 Kouhei Sutou <kou@cozmixng.org>
7
30
 
data/ext/gio2/gfile.c CHANGED
@@ -1080,7 +1080,7 @@ file_set_attribute(int argc, VALUE *argv, VALUE self)
1080
1080
  gint32 gint32_value;
1081
1081
  guint64 guint64_value;
1082
1082
  gint64 gint64_value;
1083
- char **stringv_value = NULL;
1083
+ const char **stringv_value = NULL;
1084
1084
  GFileQueryInfoFlags flags;
1085
1085
  GCancellable *cancellable;
1086
1086
  GError *error = NULL;
@@ -1094,7 +1094,7 @@ file_set_attribute(int argc, VALUE *argv, VALUE self)
1094
1094
  switch (type) {
1095
1095
  case G_FILE_ATTRIBUTE_TYPE_STRING:
1096
1096
  case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
1097
- value = RVAL2CSTR(rbvalue);
1097
+ value = (gpointer)RVAL2CSTR(rbvalue);
1098
1098
  break;
1099
1099
  case G_FILE_ATTRIBUTE_TYPE_BOOLEAN:
1100
1100
  gboolean_value = RVAL2CBOOL(rbvalue);
@@ -1120,7 +1120,8 @@ file_set_attribute(int argc, VALUE *argv, VALUE self)
1120
1120
  value = RVAL2GOBJ(rbvalue);
1121
1121
  break;
1122
1122
  case G_FILE_ATTRIBUTE_TYPE_STRINGV:
1123
- value = stringv_value = ARY2STRVECTOR(rbvalue);
1123
+ stringv_value = RVAL2STRV(rbvalue);
1124
+ value = (gpointer)stringv_value;
1124
1125
  break;
1125
1126
  case G_FILE_ATTRIBUTE_TYPE_INVALID:
1126
1127
  default:
data/ext/gio2/gio2.h CHANGED
@@ -113,7 +113,7 @@ GType g_file_attribute_info_list_get_type(void);
113
113
  #define RVAL2GMOUNT(value) G_MOUNT(RVAL2GOBJ(value))
114
114
 
115
115
  #define RVAL2GMOUNTMOUNTFLAGS(value) \
116
- RVAL2GFLAGS((value), G_TYPE_MOUNT_MOUNT_FLAGS)
116
+ RVAL2GENUM((value), G_TYPE_MOUNT_MOUNT_FLAGS)
117
117
  #define RVAL2GMOUNTMOUNTFLAGSDEFAULT(value) \
118
118
  RVAL2TYPE_WITH_DEFAULT((value), \
119
119
  RVAL2GMOUNTMOUNTFLAGS, \
@@ -140,14 +140,14 @@ GType g_file_attribute_info_list_get_type(void);
140
140
  #define RVAL2GSOCKETFAMILY(value) RVAL2GENUM((value), G_TYPE_SOCKET_FAMILY)
141
141
 
142
142
  #define GSOCKETPROTOCOL2RVAL(value) GENUM2RVAL((value), G_TYPE_SOCKET_PROTOCOL)
143
- #define RVAL2GSOCKETPROTOCOL(value) RVAL2GFLAGS((value), G_TYPE_SOCKET_PROTOCOL)
143
+ #define RVAL2GSOCKETPROTOCOL(value) RVAL2GENUM((value), G_TYPE_SOCKET_PROTOCOL)
144
144
  #define RVAL2GSOCKETPROTOCOLDEFAULT(value) \
145
145
  RVAL2TYPE_WITH_DEFAULT((value), \
146
146
  RVAL2GSOCKETPROTOCOL, \
147
147
  G_SOCKET_PROTOCOL_DEFAULT)
148
148
 
149
149
  #define GSOCKETTYPE2RVAL(value) GENUM2RVAL((value), G_TYPE_SOCKET_TYPE)
150
- #define RVAL2GSOCKETTYPE(value) RVAL2GFLAGS((value), G_TYPE_SOCKET_TYPE)
150
+ #define RVAL2GSOCKETTYPE(value) RVAL2GENUM((value), G_TYPE_SOCKET_TYPE)
151
151
 
152
152
  #define GTIMEVAL2RVAL(value) rb_time_new((value)->tv_sec, (value)->tv_usec)
153
153
 
@@ -228,7 +228,6 @@ GType g_file_attribute_info_list_get_type(void);
228
228
 
229
229
  #define STRVECTOR2ARY(vector) rbgio_str_vector_to_ary(vector)
230
230
  #define STRVECTOR2ARY_FREE(vector) rbgio_str_vector_to_ary_free(vector)
231
- #define ARY2STRVECTOR(ary) rbgio_ary_to_str_vector(ary)
232
231
 
233
232
  G_GNUC_INTERNAL VALUE rbgio_cstr_to_rval_tainted(const char *string,
234
233
  gsize length);
@@ -242,7 +241,6 @@ G_GNUC_INTERNAL GList *rbgio_gfile_ary_to_glist_accept_nil(VALUE ary);
242
241
  G_GNUC_INTERNAL void rbgio_rval_to_gtimeval(VALUE value, GTimeVal *time);
243
242
  G_GNUC_INTERNAL VALUE rbgio_str_vector_to_ary(const gchar * const *vector);
244
243
  G_GNUC_INTERNAL VALUE rbgio_str_vector_to_ary_free(gchar **vector);
245
- G_GNUC_INTERNAL char **rbgio_ary_to_str_vector(VALUE ary);
246
244
  G_GNUC_INTERNAL void rbgio_async_ready_callback(GObject *source,
247
245
  GAsyncResult *result,
248
246
  gpointer data);
data/ext/gio2/gsocket.c CHANGED
@@ -298,7 +298,6 @@ socket_condition_wait(int argc, VALUE *argv, VALUE self)
298
298
  return self;
299
299
  }
300
300
 
301
- /* TODO: Need to make sure that this isn’t overridden. */
302
301
  static VALUE
303
302
  socket_get_local_address(VALUE self)
304
303
  {
@@ -367,7 +366,7 @@ Init_gsocket(VALUE glib)
367
366
  rb_define_method(socket, "create_source", socket_create_source, -1);
368
367
  rb_define_method(socket, "condition_check", socket_condition_check, 1);
369
368
  rb_define_method(socket, "condition_wait", socket_condition_wait, -1);
370
- rb_define_method(socket, "local_address", socket_get_local_address, 0);
371
- rb_define_method(socket, "remote_address", socket_get_remote_address, 0);
369
+ G_REPLACE_GET_PROPERTY(socket, "local_address", socket_get_local_address, 0);
370
+ G_REPLACE_GET_PROPERTY(socket, "remote_address", socket_get_remote_address, 0);
372
371
  rb_define_method(socket, "speaks_ipv4?", socket_speaks_ipv4, 0);
373
372
  }
@@ -26,14 +26,13 @@
26
26
  static VALUE
27
27
  themedicon_initialize(int argc, VALUE *argv, VALUE self)
28
28
  {
29
- VALUE rbiconnames, with_default_fallbacks;
30
- char **iconnames;
29
+ VALUE iconnames, with_default_fallbacks;
31
30
  GIcon *icon;
32
31
 
33
- rb_scan_args(argc, argv, "11", &rbiconnames, &with_default_fallbacks);
32
+ rb_scan_args(argc, argv, "11", &iconnames, &with_default_fallbacks);
34
33
 
35
- if (TYPE(rbiconnames) != T_ARRAY) {
36
- const char *iconname = RVAL2CSTR(rbiconnames);
34
+ if (TYPE(iconnames) != T_ARRAY) {
35
+ const char *iconname = RVAL2CSTR(iconnames);
37
36
 
38
37
  icon = RVAL2CBOOL(with_default_fallbacks) ?
39
38
  g_themed_icon_new_with_default_fallbacks(iconname) :
@@ -48,11 +47,7 @@ themedicon_initialize(int argc, VALUE *argv, VALUE self)
48
47
  rb_raise(rb_eArgError,
49
48
  "only one argument allowed when first argument is an Array");
50
49
 
51
- iconnames = ARY2STRVECTOR(rbiconnames);
52
-
53
- icon = g_themed_icon_new_from_names(iconnames, -1);
54
-
55
- g_free(iconnames);
50
+ icon = g_themed_icon_new_from_names(RVAL2STRV_DUP(iconnames), -1);
56
51
 
57
52
  G_INITIALIZE(self, icon);
58
53
 
@@ -80,7 +75,7 @@ Init_gthemedicon(VALUE glib)
80
75
  {
81
76
  VALUE themedicon = G_DEF_INTERFACE(G_TYPE_THEMED_ICON, "ThemedIcon", glib);
82
77
 
83
- rb_define_method(themedicon, "initialize", themedicon_initialize, 1);
78
+ rb_define_method(themedicon, "initialize", themedicon_initialize, -1);
84
79
  rb_define_method(themedicon, "prepend_name", themedicon_prepend_name, 1);
85
80
  rb_define_method(themedicon, "append_name", themedicon_append_name, 1);
86
81
  }
data/ext/gio2/gvolume.c CHANGED
@@ -176,7 +176,7 @@ Init_gvolume(VALUE glib)
176
176
  rb_define_method(volume, "uuid", volume_get_uuid, 0);
177
177
  rb_define_method(volume, "icon", volume_get_icon, 0);
178
178
  rb_define_method(volume, "drive", volume_get_drive, 0);
179
- rb_define_method(volume, "mount", volume_get_mount, 0);
179
+ rb_define_method(volume, "get_mount", volume_get_mount, 0);
180
180
  rb_define_method(volume, "can_mount?", volume_can_mount, 0);
181
181
  rb_define_method(volume, "should_automount?", volume_should_automount, 0);
182
182
  rb_define_method(volume, "activation_root", volume_get_activation_root, 0);
data/ext/gio2/util.c CHANGED
@@ -198,26 +198,6 @@ rbgio_str_vector_to_ary_free(gchar **vector)
198
198
  rbgio_str_vector_to_ary_free_ensure, (VALUE)vector);
199
199
  }
200
200
 
201
- char **
202
- rbgio_ary_to_str_vector(VALUE ary)
203
- {
204
- int i, n;
205
- char **strings;
206
-
207
- ary = rb_ary_to_ary(ary);
208
- n = RARRAY_LEN(ary);
209
-
210
- for (i = 0; i < n; i++)
211
- StringValue(RARRAY_PTR(ary)[i]);
212
-
213
- strings = g_new(char *, n + 1);
214
- for (i = 0; i < n; i++)
215
- strings[i] = RVAL2CSTR(RARRAY_PTR(ary)[i]);
216
- strings[n] = NULL;
217
-
218
- return strings;
219
- }
220
-
221
201
  struct async_ready_callback_data
222
202
  {
223
203
  GAsyncResult *result;
data/lib/1.8/gio2.so CHANGED
Binary file
data/lib/1.9/gio2.so CHANGED
Binary file
data/lib/gio2.rb CHANGED
@@ -5,7 +5,7 @@ vendor_dir = base_dir + "vendor" + "local"
5
5
  vendor_bin_dir = vendor_dir + "bin"
6
6
  GLib.prepend_environment_path(vendor_bin_dir)
7
7
  begin
8
- major, minor, micro, = RUBY_VERSION.split(/\./)
8
+ major, minor, _ = RUBY_VERSION.split(/\./)
9
9
  require "#{major}.#{minor}/gio2.so"
10
10
  rescue LoadError
11
11
  require "gio2.so"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gio2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: x86-mingw32
12
12
  authors:
13
13
  - The Ruby-GNOME2 Proejct Team
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-13 00:00:00 Z
18
+ date: 2011-09-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: glib2
@@ -25,12 +25,12 @@ dependencies:
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- hash: 23
28
+ hash: 21
29
29
  segments:
30
30
  - 1
31
31
  - 0
32
- - 0
33
- version: 1.0.0
32
+ - 1
33
+ version: 1.0.1
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  description: Ruby/GIO2 is a Ruby binding of gio-2.x.