glib2 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,7 +35,7 @@ extern "C" {
35
35
 
36
36
  #define RBGLIB_MAJOR_VERSION 1
37
37
  #define RBGLIB_MINOR_VERSION 2
38
- #define RBGLIB_MICRO_VERSION 4
38
+ #define RBGLIB_MICRO_VERSION 5
39
39
 
40
40
  #ifndef RSTRING_PTR
41
41
  # define RSTRING_PTR(s) (RSTRING(s)->ptr)
@@ -56,7 +56,7 @@ rg_initialize(VALUE self, VALUE fd, VALUE events, VALUE revents)
56
56
  gfd.events = NUM2INT(events);
57
57
  gfd.revents = NUM2INT(revents);
58
58
 
59
- G_INITIALIZE(self, &gfd);
59
+ G_INITIALIZE(self, g_boxed_copy(G_TYPE_POLL_FD, &gfd));
60
60
  return Qnil;
61
61
  }
62
62
 
@@ -341,7 +341,7 @@ rg_initialize(VALUE self, VALUE rb_gtype, VALUE rb_value)
341
341
 
342
342
  g_value_init(&value, NUM2INT(rb_to_int(rb_gtype)));
343
343
  rbgobj_rvalue_to_gvalue(rb_value, &value);
344
- G_INITIALIZE(self, &value);
344
+ G_INITIALIZE(self, g_boxed_copy(G_TYPE_VALUE, &value));
345
345
  g_value_unset(&value);
346
346
 
347
347
  return Qnil;
@@ -0,0 +1,26 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ class TestGLibPollFD < Test::Unit::TestCase
20
+ include GLibTestUtils
21
+
22
+ def test_fd
23
+ poll_fd = GLib::PollFD.new(0, GLib::IOChannel::IN, 0)
24
+ assert_equal(0, poll_fd.fd)
25
+ end
26
+ end
@@ -0,0 +1,31 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ class TestGLibValue < Test::Unit::TestCase
20
+ include GLibTestUtils
21
+
22
+ def test_type
23
+ value = GLib::Value.new(GLib::Type::UINT, 29)
24
+ assert_equal(GLib::Type::UINT, value.type)
25
+ end
26
+
27
+ def test_value
28
+ value = GLib::Value.new(GLib::Type::UINT, 29)
29
+ assert_equal(29, value.value)
30
+ end
31
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-24 00:00:00.000000000 Z
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pkg-config
@@ -151,11 +151,13 @@ files:
151
151
  - test/test_iochannel.rb
152
152
  - test/test_key_file.rb
153
153
  - test/test_mkenums.rb
154
+ - test/test_poll_fd.rb
154
155
  - test/test_signal.rb
155
156
  - test/test_spawn.rb
156
157
  - test/test_timeout.rb
157
158
  - test/test_unicode.rb
158
159
  - test/test_utils.rb
160
+ - test/test_value.rb
159
161
  - test/test_win32.rb
160
162
  homepage: http://ruby-gnome2.sourceforge.jp/
161
163
  licenses: []