win32-mutex 0.4.0 → 0.4.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.
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.4.1 - 10-Apr-2013
2
+ * Fixed HANDLE type in underlying FFI code. This affects 64 bit versions
3
+ of Ruby.
4
+
1
5
  == 0.4.0 - 10-Jul-2012
2
6
  * Converted to FFI.
3
7
  * Now requires Ruby 1.9 or later.
data/README CHANGED
@@ -39,7 +39,7 @@
39
39
  Artistic 2.0
40
40
 
41
41
  == Copyright
42
- (C) 2003-2012 Daniel J. Berger, All Rights Reserved
42
+ (C) 2003-2013 Daniel J. Berger, All Rights Reserved
43
43
 
44
44
  == Warranty
45
45
  This package is provided "as is" and without any express or
data/lib/win32/mutex.rb CHANGED
@@ -5,21 +5,24 @@ module Win32
5
5
 
6
6
  # The Mutex class encapsulates Windows mutex objects.
7
7
  class Mutex < 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 :CreateMutexW, [:pointer, :bool, :buffer_in], :ulong
21
- attach_function :OpenMutexW, [:ulong, :bool, :buffer_in], :ulong
22
- attach_function :ReleaseMutex, [:ulong], :bool
23
+ attach_function :CreateMutexW, [:pointer, :bool, :buffer_in], :handle
24
+ attach_function :OpenMutexW, [:dword, :bool, :buffer_in], :handle
25
+ attach_function :ReleaseMutex, [:handle], :bool
23
26
 
24
27
  private_class_method :CreateMutexW, :OpenMutexW, :ReleaseMutex
25
28
 
@@ -29,7 +32,7 @@ module Win32
29
32
  public
30
33
 
31
34
  # The version of the win32-mutex library
32
- VERSION = '0.4.0'
35
+ VERSION = '0.4.1'
33
36
 
34
37
  # The name of the mutex object.
35
38
  attr_reader :name
@@ -14,8 +14,8 @@ class TC_Win32_Mutex < Test::Unit::TestCase
14
14
  @umutex = Win32::Mutex.new(false, 'Ηελλας')
15
15
  end
16
16
 
17
- def test_version
18
- assert_equal('0.4.0', Win32::Mutex::VERSION)
17
+ test "version is set to expected value" do
18
+ assert_equal('0.4.1', Win32::Mutex::VERSION)
19
19
  end
20
20
 
21
21
  test "constructor with no arguments works as expected" do
data/win32-mutex.gemspec CHANGED
@@ -2,11 +2,11 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-mutex'
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'
9
- spec.homepage = 'http://www.rubyforge.org/projects/win32utils'
9
+ spec.homepage = 'https://github.com/djberg96/win32-mutex'
10
10
  spec.summary = 'Interface to MS Windows Mutex objects.'
11
11
  spec.test_file = 'test/test_win32_mutex.rb'
12
12
  spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-mutex
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
@@ -63,7 +63,7 @@ files:
63
63
  - README
64
64
  - test/test_win32_mutex.rb
65
65
  - win32-mutex.gemspec
66
- homepage: http://www.rubyforge.org/projects/win32utils
66
+ homepage: https://github.com/djberg96/win32-mutex
67
67
  licenses:
68
68
  - Artistic 2.0
69
69
  post_install_message: