og-corefoundation 0.2.2 → 0.2.3

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: 0775d4fbf137710893be7902885ff9c348f2fc4c83bef0f38db8ba7e5a0cbb81
4
- data.tar.gz: 3abe696cb4fd2973452e50d6e26e7091a951d3ef16af98694997e21261d9c207
3
+ metadata.gz: ec701eb276e895b898552abc364e9dc8eebe76a5d51d84011b1b5406751ef3b6
4
+ data.tar.gz: ad3d0ba5ceaed6c72abf68dcb21f9d22ddf7a03cfadd32317fd5bf81fbefe673
5
5
  SHA512:
6
- metadata.gz: 42af4f5b927148b606fe04193d429ac61677089e99e850112bcdadcb320bec1e28e9e2c01899e1137fb57b9b9192b4e02bd17cc91ef1c7bcf5f28bd33275456a
7
- data.tar.gz: 81223f45bd08ea2efa2cd86dedb73a9d527ad6dad4768630ab6919b4ce94a99e2aca3f6b70378ed1c3d6e57152ccdc463f30ae8394104527915608ae56db30fd
6
+ metadata.gz: fa6df27f22f95f28ce8ebb21b2613f38328345c5f6c8ee8000479ff7f41284e032fea268e31234e76d928a5ba7e2d53c4e1bcc3c64d12454cf2db6fe9d876e00
7
+ data.tar.gz: 4284c22b9cc4ab964056155dd19889e53eb8e9f3cf1f72302043670fe1bbf91b662f0625f73ded8115255374fac4d50d3ba4f2a9da4c6b18b6e2f79dd5b67422
data/CHANGELOG CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## 0.2.3
5
+
6
+ Fix release_on_gc for values where the high bit is set
7
+
4
8
  ## 0.2.2
5
9
 
6
10
  fix finalizer exception (again)
@@ -47,13 +47,15 @@ module CF
47
47
  # @private
48
48
  class Releaser
49
49
  def initialize(ptr)
50
- @address = ptr.address
50
+ # this creates a pointer that has the same value
51
+ # without creating a gc reference to the original ptr
52
+ @ptr = FFI::MemoryPointer.new(:pointer).write_pointer(ptr).read_pointer
51
53
  end
52
54
 
53
55
  def call *ignored
54
- if @address != 0
55
- CF.release(FFI::Pointer.new(:pointer, @address))
56
- @address = 0
56
+ if @ptr && !@ptr.null?
57
+ CF.release(@ptr)
58
+ @ptr = nil
57
59
  end
58
60
  end
59
61
  end
@@ -1,4 +1,4 @@
1
1
  module CF
2
2
  # The current version string
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
data/spec/spec_helper.rb CHANGED
@@ -7,6 +7,8 @@ require 'corefoundation'
7
7
 
8
8
  RSpec.configure do |config|
9
9
  config.after(:suite) do
10
+ puts '****'
10
11
  GC.start #flush out any issues with finalizers
12
+ puts '****'
11
13
  end
12
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: og-corefoundation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick Cheung