glib2 3.1.6 → 3.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -3
- data/ext/glib2/rbglib-bytes.c +24 -0
- data/ext/glib2/rbglib.c +1 -0
- data/ext/glib2/rbglib.h +1 -1
- data/ext/glib2/rbglib_error.c +15 -1
- data/ext/glib2/rbgprivate.h +1 -0
- data/lib/glib-mkenums.rb +1 -1
- data/lib/glib2.rb +1 -1
- data/lib/mkmf-gnome2.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43029cc37df23718705b4017163ce8da2714a8d2
|
4
|
+
data.tar.gz: ff1491847df688d57cfc727a6cf3058c541aefb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb12725ee5ab2adf157cfbd8cc1b2f4d1e5395c72fec9bd099567fa5f0166208f534147e153ee4b8fc5934da25b90523e77863fcf7c2baae0f5a52738e73fabc
|
7
|
+
data.tar.gz: 29195c331c0f750bbce6aa9a83710c360c089444acd770956d75de7f8d43720d900aea4d85fd4f5363c04ff7c1127f8f5b6c64ac29d154819fecb75f4d7db124
|
data/Rakefile
CHANGED
@@ -88,13 +88,12 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
88
88
|
:name => "glib",
|
89
89
|
:download_site => :gnome,
|
90
90
|
:label => "GLib",
|
91
|
-
:version => "2.52.
|
91
|
+
:version => "2.52.3",
|
92
92
|
:compression_method => "xz",
|
93
93
|
:windows => {
|
94
94
|
:need_autoreconf => true,
|
95
95
|
:patches => [
|
96
96
|
"glib-2.48.0-add-missing-exeext.diff",
|
97
|
-
"glib-2.52.1-fix-build-error.diff",
|
98
97
|
],
|
99
98
|
:built_file => "bin/libglib-2.0-0.dll",
|
100
99
|
},
|
@@ -127,7 +126,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
127
126
|
:name => "libtasn1",
|
128
127
|
:download_site => :gnu,
|
129
128
|
:label => "Libtasn1",
|
130
|
-
:version => "4.
|
129
|
+
:version => "4.12",
|
131
130
|
:windows => {
|
132
131
|
:built_file => "bin/libtasn1-6.dll",
|
133
132
|
},
|
data/ext/glib2/rbglib-bytes.c
CHANGED
@@ -63,6 +63,27 @@ rg_to_s(VALUE self)
|
|
63
63
|
# endif
|
64
64
|
return rb_data;
|
65
65
|
}
|
66
|
+
|
67
|
+
static VALUE
|
68
|
+
rg_size(VALUE self)
|
69
|
+
{
|
70
|
+
GBytes *bytes;
|
71
|
+
|
72
|
+
bytes = _SELF(self);
|
73
|
+
return ULONG2NUM(g_bytes_get_size(bytes));
|
74
|
+
}
|
75
|
+
|
76
|
+
static VALUE
|
77
|
+
rg_pointer(VALUE self)
|
78
|
+
{
|
79
|
+
GBytes *bytes;
|
80
|
+
gconstpointer data;
|
81
|
+
|
82
|
+
bytes = _SELF(self);
|
83
|
+
data = g_bytes_get_data(bytes, NULL);
|
84
|
+
|
85
|
+
return ULONG2NUM((guintptr)data);
|
86
|
+
}
|
66
87
|
#endif
|
67
88
|
|
68
89
|
void
|
@@ -74,5 +95,8 @@ Init_glib_bytes(void)
|
|
74
95
|
RG_DEF_METHOD(initialize, -1);
|
75
96
|
RG_DEF_METHOD(to_s, 0);
|
76
97
|
RG_DEF_ALIAS("to_str", "to_s");
|
98
|
+
RG_DEF_METHOD(size, 0);
|
99
|
+
RG_DEF_ALIAS("length", "size");
|
100
|
+
RG_DEF_METHOD(pointer, 0);
|
77
101
|
#endif
|
78
102
|
}
|
data/ext/glib2/rbglib.c
CHANGED
data/ext/glib2/rbglib.h
CHANGED
data/ext/glib2/rbglib_error.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2011-2017 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2004 Masao Mutoh
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -146,6 +146,14 @@ rbgerr_define_gerror(GQuark domain, const gchar *name, VALUE module, VALUE paren
|
|
146
146
|
return error_class;
|
147
147
|
}
|
148
148
|
|
149
|
+
static VALUE
|
150
|
+
rbg_error_to_ruby(const GValue *from)
|
151
|
+
{
|
152
|
+
GError *error;
|
153
|
+
error = g_value_get_boxed(from);
|
154
|
+
return GERROR2RVAL(error);
|
155
|
+
}
|
156
|
+
|
149
157
|
void
|
150
158
|
Init_glib_error(void)
|
151
159
|
{
|
@@ -162,3 +170,9 @@ Init_glib_error(void)
|
|
162
170
|
generic_error = rb_define_class_under(mGLib, "Error", rb_eRuntimeError);
|
163
171
|
rb_include_module(generic_error, error_info);
|
164
172
|
}
|
173
|
+
|
174
|
+
void
|
175
|
+
Init_glib_error_conversions(void)
|
176
|
+
{
|
177
|
+
rbgobj_register_g2r_func(G_TYPE_ERROR, rbg_error_to_ruby);
|
178
|
+
}
|
data/ext/glib2/rbgprivate.h
CHANGED
@@ -118,6 +118,7 @@ G_GNUC_INTERNAL void Init_gutil_callback(void);
|
|
118
118
|
G_GNUC_INTERNAL void Init_glib_gettext(void);
|
119
119
|
G_GNUC_INTERNAL void Init_glib_int64(void);
|
120
120
|
G_GNUC_INTERNAL void Init_glib_error(void);
|
121
|
+
G_GNUC_INTERNAL void Init_glib_error_conversions(void);
|
121
122
|
G_GNUC_INTERNAL void Init_glib_threads(void);
|
122
123
|
G_GNUC_INTERNAL void Init_glib_convert(void);
|
123
124
|
G_GNUC_INTERNAL void Init_glib_messages(void);
|
data/lib/glib-mkenums.rb
CHANGED
data/lib/glib2.rb
CHANGED
@@ -107,10 +107,10 @@ module GLib
|
|
107
107
|
begin
|
108
108
|
require "ruby_installer/runtime"
|
109
109
|
rescue LoadError
|
110
|
-
prepend_path_to_environment_variable(path, "PATH")
|
111
110
|
else
|
112
111
|
RubyInstaller::Runtime.add_dll_directory(path.to_s)
|
113
112
|
end
|
113
|
+
prepend_path_to_environment_variable(path, "PATH")
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
data/lib/mkmf-gnome2.rb
CHANGED
@@ -151,7 +151,8 @@ def setup_homebrew_libffi
|
|
151
151
|
platform = NativePackageInstaller::Platform.detect
|
152
152
|
return unless platform.is_a?(NativePackageInstaller::Platform::Homebrew)
|
153
153
|
|
154
|
-
|
154
|
+
libffi_prefix = `brew --prefix libffi`
|
155
|
+
PKGConfig.add_path("#{libffi_prefix}/lib/pkgconfig")
|
155
156
|
end
|
156
157
|
|
157
158
|
#add_depend_package("glib2", "ext/glib2", "/...../ruby-gnome2")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pkg-config
|