libvirt_ffi 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43c4cf7b7fa510b96605a9f05e8f04680280459d48572085740a71f145ce1442
4
- data.tar.gz: a3ca5f72fdeb7de0cc95b440f58c5b894970add2cb746c12e3191d12269dcc42
3
+ metadata.gz: 5b00c5abd950bc50a399401e1cd58739b9e730aa51854d0e1e6a33367ca6a5a9
4
+ data.tar.gz: 78cf9477468e8f3ce2501f516ccaa0036ca2423bba115ca2838d10587e80496a
5
5
  SHA512:
6
- metadata.gz: f1b7448f8ebd67349c59a365d1b30072bf99d5f78ffc1b07c87f99a312365f4d42474e62886c71e797fd0deab4c6f726af6440d6c4bb350fb8a65ee751b68ed5
7
- data.tar.gz: 24056f945020275a102517bd6f4fba560be15c0f4fea7725b9c4b9b6032a1e94695b1520094c4027bf4ea0e34291e00148efefbb60d114640980e6c69e9f6cae
6
+ metadata.gz: c8b57bc7809f3d25297a5e051753777f092ef11b9609b5d1c3046f6f5961b452c55a2dfc0501bab92d53b9ca847b1657eea066ff9f6865dd46cc111ae7dbe66c
7
+ data.tar.gz: 2bb593a6571ba042f8f838523a21a4f4ff91c5242c08d55821af983d4561b2aa5faaed88e53d489457b6eae8fdb97c3802b099693c90f69c8ac169b52ec238bb
@@ -180,7 +180,8 @@ module Libvirt
180
180
  connection_pointer: @conn_ptr,
181
181
  callback_id: result,
182
182
  cb: block,
183
- opaque: opaque
183
+ opaque: opaque,
184
+ free_func: cb_data_free_func
184
185
  )
185
186
  result
186
187
  end
@@ -213,7 +214,8 @@ module Libvirt
213
214
  connection_pointer: @conn_ptr,
214
215
  callback_id: result,
215
216
  cb: block,
216
- opaque: opaque
217
+ opaque: opaque,
218
+ free_func: cb_data_free_func
217
219
  )
218
220
  result
219
221
  end
@@ -256,7 +258,8 @@ module Libvirt
256
258
  connection_pointer: @conn_ptr,
257
259
  callback_id: result,
258
260
  cb: block,
259
- opaque: opaque
261
+ opaque: opaque,
262
+ free_func: cb_data_free_func
260
263
  )
261
264
  result
262
265
  end
@@ -29,12 +29,20 @@ module Libvirt
29
29
  [cb_data, cb_data_free_func]
30
30
  end
31
31
 
32
- def store_struct(cb_data, connection_pointer:, callback_id:, cb:, opaque:)
32
+ def store_struct(cb_data, options)
33
33
  dbg { '#store_struct' }
34
34
 
35
+ options.assert_valid_keys(:connection_pointer, :callback_id, :cb, :opaque, :free_func)
36
+ connection_pointer = options.fetch(:connection_pointer)
37
+ callback_id = options.fetch(:callback_id)
38
+ cb = options.fetch(:cb)
39
+ opaque = options.fetch(:opaque)
40
+ free_func = options.fetch(:free_func)
35
41
  cb_data[:connection_pointer] = connection_pointer
36
42
  cb_data[:callback_id] = callback_id
37
- @inner_storage[connection_pointer.address][callback_id] = { cb: cb, opaque: opaque, pointer: cb_data.pointer }
43
+ @inner_storage[connection_pointer.address][callback_id] = {
44
+ cb: cb, opaque: opaque, pointer: cb_data.pointer, free_func: free_func
45
+ }
38
46
  end
39
47
 
40
48
  def remove_struct(pointer)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Libvirt
4
- VERSION = '0.6.1'
4
+ VERSION = '0.6.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libvirt_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-30 00:00:00.000000000 Z
11
+ date: 2020-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi