ruby-vips 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 294dcea3bbc7b03ef6652be00b29732722bde853
4
- data.tar.gz: 407c694bb0080bd7bdca1469e3db50f58c5c0daf
3
+ metadata.gz: 4678e6b9ab0569b528f25f1ad9eaaa01c40d9142
4
+ data.tar.gz: 5e7cfa1695d8cc2e75bbb944c0c6b71bcf030d64
5
5
  SHA512:
6
- metadata.gz: a36160fc23f5953312f4e3e4fb44db4c45bf4f024586e72f397b7c88457284d4a1e2e0705ca83d2c993b04500d5347ea226b3af3889b91d81396ea432e1e4664
7
- data.tar.gz: 83e9faa1e666f2d503a9d93f8a249b49c03bf4cda7a5b83bbc60df98e4dde0f51fd73086108749266b752dc887047a02e0ddad49b2f4f0a94b02815a3b2bd884
6
+ metadata.gz: f93eaaa519c4b6e5c1089d4e2a22c5901cd3bd5f818ee72f8c064633dbe772939381e78482db1d8521faea53bb70624274d29e8c47c76a6637cfaaf9c0d7549b
7
+ data.tar.gz: abccdf5bd42c8e8a2b3bf3bfdac36805d461edc1d38d84ceb6805e754f2f25b1cc76f6004785169468478de697c75706c8ebcb5af4a020514043fb8b4b90d664
@@ -1,5 +1,9 @@
1
1
  # master
2
2
 
3
+ # Version 2.0.1
4
+
5
+ * add support for VipsRefStr in gvalue, thanks tomasc
6
+
3
7
  # Version 2.0.0
4
8
 
5
9
  * rewrite on top of 'ffi' [John Cupitt, Kleis Auke Wolthuizen]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
@@ -74,9 +74,11 @@ module GObject
74
74
  ::GObject::g_value_set_double self, value
75
75
 
76
76
  when GSTR_TYPE
77
- # set_string takes a copy, no lifetime worries
78
77
  ::GObject::g_value_set_string self, value
79
78
 
79
+ when Vips::REFSTR_TYPE
80
+ ::Vips::vips_value_set_ref_string self, value
81
+
80
82
  when Vips::ARRAY_INT_TYPE
81
83
  value = [value] if not value.is_a? Array
82
84
 
@@ -133,7 +135,9 @@ module GObject
133
135
  ::GObject::g_value_set_object self, value
134
136
 
135
137
  else
136
- raise Vips::Error, "unimplemented gtype for set: #{gtype}"
138
+ raise Vips::Error, "unimplemented gtype for set: " +
139
+ "#{::GObject::g_type_name gtype} (#{gtype})"
140
+
137
141
  end
138
142
  end
139
143
  end
@@ -158,9 +162,12 @@ module GObject
158
162
  result = ::GObject::g_value_get_double self
159
163
 
160
164
  when GSTR_TYPE
161
- # FIXME do we need to strdup here?
162
165
  result = ::GObject::g_value_get_string self
163
166
 
167
+ when Vips::REFSTR_TYPE
168
+ len = Vips::SizeStruct.new
169
+ result = ::Vips::vips_value_get_ref_string self, len
170
+
164
171
  when Vips::ARRAY_INT_TYPE
165
172
  len = Vips::IntStruct.new
166
173
  array = Vips::vips_value_get_array_int self, len
@@ -208,7 +215,8 @@ module GObject
208
215
  result = Vips::Image.new obj
209
216
 
210
217
  else
211
- raise Vips::Error, "unimplemented gtype for get: #{gtype}"
218
+ raise Vips::Error, "unimplemented gtype for get: " +
219
+ "#{::GObject::g_type_name gtype} (#{gtype})"
212
220
 
213
221
  end
214
222
  end
@@ -216,6 +224,7 @@ module GObject
216
224
  # Vips::log "GObject::GValue.get: result = #{result.inspect[0..50]}"
217
225
 
218
226
  return result
227
+
219
228
  end
220
229
 
221
230
  end
@@ -34,6 +34,8 @@ module Vips
34
34
  attach_function :vips_enum_from_nick, [:string, :GType, :string], :int
35
35
  attach_function :vips_enum_nick, [:GType, :int], :string
36
36
 
37
+ attach_function :vips_value_set_ref_string,
38
+ [GObject::GValue.ptr, :string], :void
37
39
  attach_function :vips_value_set_array_double,
38
40
  [GObject::GValue.ptr, :pointer, :int], :void
39
41
  attach_function :vips_value_set_array_int,
@@ -1,4 +1,4 @@
1
1
  module Vips
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-vips
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Cupitt