win32-semaphore 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.4.1 - 10-Apr-2013
2
+ * Fixed the HANDLE type in the underlying FFI code. This affects
3
+ 64 bit versions of Ruby.
4
+
1
5
  == 0.4.0 - 10-Jul-2012
2
6
  * Converted source to use FFI.
3
7
  * Refactored tests.
data/README CHANGED
@@ -44,7 +44,7 @@
44
44
  Artistic 2.0
45
45
 
46
46
  == Copyright
47
- (C) 2003-2012 Daniel J. Berger
47
+ (C) 2003-2013 Daniel J. Berger
48
48
  All Rights Reserved
49
49
 
50
50
  == Warranty
@@ -5,21 +5,24 @@ module Win32
5
5
 
6
6
  # The Semaphore class encapsulates semaphore objects on Windows.
7
7
  class Semaphore < Ipc
8
+ typedef :ulong, :dword
9
+ typedef :uintptr_t, :handle
10
+
8
11
  ffi_lib :kernel32
9
12
 
10
13
  private
11
14
 
12
15
  class SecurityAttributes < FFI::Struct
13
16
  layout(
14
- :nLength, :ulong,
17
+ :nLength, :dword,
15
18
  :lpSecurityDescriptor, :pointer,
16
19
  :bInheritHandle, :bool
17
20
  )
18
21
  end
19
22
 
20
- attach_function :CreateSemaphoreW, [:pointer, :long, :long, :buffer_in], :ulong
21
- attach_function :OpenSemaphoreW, [:ulong, :bool, :buffer_in], :ulong
22
- attach_function :ReleaseSemaphore, [:ulong, :long, :pointer], :bool
23
+ attach_function :CreateSemaphoreW, [:pointer, :long, :long, :buffer_in], :handle
24
+ attach_function :OpenSemaphoreW, [:dword, :bool, :buffer_in], :handle
25
+ attach_function :ReleaseSemaphore, [:handle, :long, :pointer], :bool
23
26
 
24
27
  private_class_method :CreateSemaphoreW, :OpenSemaphoreW, :ReleaseSemaphore
25
28
 
@@ -29,7 +32,7 @@ module Win32
29
32
  public
30
33
 
31
34
  # The version of the win32-semaphore library
32
- VERSION = '0.4.0'
35
+ VERSION = '0.4.1'
33
36
 
34
37
  # The initial count for the semaphore object. This value must be greater
35
38
  # than or equal to zero and less than or equal to +max_count+. The state
@@ -14,7 +14,7 @@ class TC_Semaphore < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  test "version is set to expected value" do
17
- assert_equal('0.4.0', Semaphore::VERSION)
17
+ assert_equal('0.4.1', Semaphore::VERSION)
18
18
  end
19
19
 
20
20
  test "initial_count basic functionality" do
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-semaphore'
5
- spec.version = '0.4.0'
5
+ spec.version = '0.4.1'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-semaphore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-10 00:00:00.000000000 Z
12
+ date: 2013-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: win32-ipc