ffi-gphoto2 0.6.0 → 0.6.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: 39745534e29e0571decd8eda706d74278a146cc1
4
- data.tar.gz: 83c84f47474b4bd940748b11f4b65769db508550
3
+ metadata.gz: 47eba00fa220e5731024fb274417962e94dd3f9d
4
+ data.tar.gz: 7dc8ef9e1df14a714b959b0155d229aa4bced308
5
5
  SHA512:
6
- metadata.gz: 287d38fca23d5e76207ea9f4e93d89ee4856f4c30a7deb198c5c2dc305d1eae171b881b3427671c10d623d605ffa877e9708a1db4efbc72ceb19fe0bc3c2589b
7
- data.tar.gz: 8e69d5a190b2db161ce6d8be0bdb153282d7407955b8ce98a8b0269ecc544b63d2ac7b3bf0a2ffcf22631f23e75694bf15d1f0d7441d8124753b8a4a4f7f83bf
6
+ metadata.gz: f4c3d6e6eeaf9ccb3579405b3410214a299c0b5ef9a94b0f3c1462963d5012a82585354411d4803609526191477f495374e5668c1f190812471ac6ec31d9bd9b
7
+ data.tar.gz: c8323dd877ff8d23fb5e9c3aca348be5cd6683f5643cc46e7b498da246f5e08b4b7b30aec248e85220cb55dbe90d48cc97a52fc9a3b65ad29e56d9d2d1206b57
data/CHANGELOG.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  ## HEAD
4
4
 
5
- ## 0.6.0
5
+ * [FIX] `ManagedStruct.release` actually calls `*_free` functions. Autorelease
6
+ invocations were silently failing with a `TypeError` because the functions
7
+ expected structs, not pointers.
8
+
9
+ ## 0.6.0 (2016-07-11)
6
10
 
7
11
  * [FIX] Use the correct default filename when a `CameraFile` is a preview.
8
12
  * [ADD] Add `CameraFileInfo` and related operations. `CameraFile#info` only
data/lib/ffi/gphoto2.rb CHANGED
@@ -38,7 +38,7 @@ module FFI
38
38
 
39
39
  # gphoto2/gphoto2-abilities-list.h
40
40
  attach_function :gp_abilities_list_new, [:pointer], :int
41
- attach_function :gp_abilities_list_free, [CameraAbilitiesList.by_ref], :int
41
+ attach_function :gp_abilities_list_free, [:pointer], :int
42
42
  attach_function :gp_abilities_list_load, [CameraAbilitiesList.by_ref, GPContext.by_ref], :int
43
43
  attach_function :gp_abilities_list_detect, [CameraAbilitiesList.by_ref, GPhoto2Port::GPPortInfoList.by_ref, CameraList.by_ref, GPContext.by_ref], :int
44
44
  attach_function :gp_abilities_list_lookup_model, [CameraAbilitiesList.by_ref, :string], :int
@@ -70,12 +70,12 @@ module FFI
70
70
 
71
71
  # gphoto2/gphoto2-file.h
72
72
  attach_function :gp_file_new, [:pointer], :int
73
- attach_function :gp_file_free, [CameraFile.by_ref], :int
73
+ attach_function :gp_file_free, [:pointer], :int
74
74
  attach_function :gp_file_get_data_and_size, [CameraFile.by_ref, :pointer, :pointer], :int
75
75
 
76
76
  # gphoto2/gphoto2-list.h
77
77
  attach_function :gp_list_new, [:pointer], :int
78
- attach_function :gp_list_free, [CameraList.by_ref], :int
78
+ attach_function :gp_list_free, [:pointer], :int
79
79
  attach_function :gp_list_count, [CameraList.by_ref], :int
80
80
  attach_function :gp_list_get_name, [CameraList.by_ref, :int, :pointer], :int
81
81
  attach_function :gp_list_get_value, [CameraList.by_ref, :int, :pointer], :int
@@ -20,7 +20,7 @@ module FFI
20
20
  attach_function :gp_port_info_get_type, [GPPortInfo, :pointer], :int
21
21
 
22
22
  attach_function :gp_port_info_list_new, [:pointer], :int
23
- attach_function :gp_port_info_list_free, [GPPortInfoList.by_ref], :int
23
+ attach_function :gp_port_info_list_free, [:pointer], :int
24
24
  attach_function :gp_port_info_list_load, [GPPortInfoList.by_ref], :int
25
25
  attach_function :gp_port_info_list_lookup_path, [GPPortInfoList.by_ref, :string], :int
26
26
  attach_function :gp_port_info_list_get_info, [GPPortInfoList.by_ref, :int, :pointer], :int
@@ -179,7 +179,7 @@ module GPhoto2
179
179
  end
180
180
 
181
181
  def new
182
- ptr = FFI::MemoryPointer.new(FFI::GPhoto2::Camera)
182
+ ptr = FFI::MemoryPointer.new(:pointer)
183
183
  rc = gp_camera_new(ptr)
184
184
  GPhoto2.check!(rc)
185
185
  @ptr = FFI::GPhoto2::Camera.new(ptr.read_pointer)
@@ -138,7 +138,7 @@ module GPhoto2
138
138
  end
139
139
 
140
140
  def get_config
141
- widget_ptr = FFI::MemoryPointer.new(FFI::GPhoto2::CameraWidget)
141
+ widget_ptr = FFI::MemoryPointer.new(:pointer)
142
142
  rc = gp_camera_get_config(ptr, widget_ptr, context.ptr)
143
143
  GPhoto2.check!(rc)
144
144
  widget = FFI::GPhoto2::CameraWidget.new(widget_ptr.read_pointer)
@@ -32,7 +32,7 @@ module GPhoto2
32
32
  private
33
33
 
34
34
  def new
35
- ptr = FFI::MemoryPointer.new(FFI::GPhoto2::CameraAbilitiesList)
35
+ ptr = FFI::MemoryPointer.new(:pointer)
36
36
  rc = gp_abilities_list_new(ptr)
37
37
  GPhoto2.check!(rc)
38
38
  @ptr = FFI::GPhoto2::CameraAbilitiesList.new(ptr.read_pointer)
@@ -66,7 +66,7 @@ module GPhoto2
66
66
  end
67
67
 
68
68
  def new
69
- ptr = FFI::MemoryPointer.new(FFI::GPhoto2::CameraFile)
69
+ ptr = FFI::MemoryPointer.new(:pointer)
70
70
  rc = gp_file_new(ptr)
71
71
  GPhoto2.check!(rc)
72
72
  @ptr = FFI::GPhoto2::CameraFile.new(ptr.read_pointer)
@@ -21,7 +21,7 @@ module GPhoto2
21
21
  private
22
22
 
23
23
  def new
24
- ptr = FFI::MemoryPointer.new(FFI::GPhoto2::CameraList)
24
+ ptr = FFI::MemoryPointer.new(:pointer)
25
25
  rc = gp_list_new(ptr)
26
26
  GPhoto2.check!(rc)
27
27
  @ptr = FFI::GPhoto2::CameraList.new(ptr.read_pointer)
@@ -127,7 +127,7 @@ module GPhoto2
127
127
  end
128
128
 
129
129
  def get_child(index)
130
- widget_ptr = FFI::MemoryPointer.new(FFI::GPhoto2::CameraWidget)
130
+ widget_ptr = FFI::MemoryPointer.new(:pointer)
131
131
  rc = gp_widget_get_child(ptr, index, widget_ptr)
132
132
  GPhoto2.check!(rc)
133
133
  widget = FFI::GPhoto2::CameraWidget.new(widget_ptr.read_pointer)
@@ -25,7 +25,7 @@ module GPhoto2
25
25
  private
26
26
 
27
27
  def new
28
- ptr = FFI::MemoryPointer.new(GPPortInfoList)
28
+ ptr = FFI::MemoryPointer.new(:pointer)
29
29
  rc = gp_port_info_list_new(ptr)
30
30
  GPhoto2.check!(rc)
31
31
  @ptr = GPPortInfoList.new(ptr.read_pointer)
@@ -1,3 +1,3 @@
1
1
  module GPhoto2
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-gphoto2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Macias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-11 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -243,4 +243,3 @@ test_files:
243
243
  - spec/support/shared_examples/camera/filesystem_examples.rb
244
244
  - spec/support/shared_examples/camera_file_info_examples.rb
245
245
  - spec/support/shared_examples/camera_widget_examples.rb
246
- has_rdoc: