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 +4 -0
- data/README +1 -1
- data/lib/win32/mutex.rb +8 -5
- data/test/test_win32_mutex.rb +2 -2
- data/win32-mutex.gemspec +2 -2
- metadata +3 -3
data/CHANGES
CHANGED
data/README
CHANGED
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, :
|
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], :
|
21
|
-
attach_function :OpenMutexW, [:
|
22
|
-
attach_function :ReleaseMutex, [:
|
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.
|
35
|
+
VERSION = '0.4.1'
|
33
36
|
|
34
37
|
# The name of the mutex object.
|
35
38
|
attr_reader :name
|
data/test/test_win32_mutex.rb
CHANGED
@@ -14,8 +14,8 @@ class TC_Win32_Mutex < Test::Unit::TestCase
|
|
14
14
|
@umutex = Win32::Mutex.new(false, 'Ηελλας')
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
assert_equal('0.4.
|
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.
|
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 = '
|
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.
|
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:
|
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:
|
66
|
+
homepage: https://github.com/djberg96/win32-mutex
|
67
67
|
licenses:
|
68
68
|
- Artistic 2.0
|
69
69
|
post_install_message:
|