win32-nio 0.1.0 → 0.1.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.1.1 - 10-Apr-2013
2
+ * Updated the HANDLE type in the underlying FFI code. This affects
3
+ 64 bit versions of Ruby.
4
+
1
5
  == 0.1.0 - 12-Jul-2012
2
6
  * Changed from win32-api to FFI.
3
7
  * Now requires Ruby 1.9 or later.
data/README CHANGED
@@ -49,7 +49,7 @@
49
49
 
50
50
  = Known Bugs
51
51
  None that I know of. Please log any other bug reports on the RubyForge
52
- project page at http://www.rubyforge.net/projects/win32utils
52
+ project page at https://github.com/djberg96/win32-nio.
53
53
 
54
54
  = Future Plans
55
55
  The pure Ruby code is really only meant for prototyping. The eventual
@@ -60,7 +60,7 @@
60
60
  Artistic 2.0
61
61
 
62
62
  = Copyright
63
- (C) 2008-2012 Daniel J. Berger, All Rights Reserved
63
+ (C) 2008-2013 Daniel J. Berger, All Rights Reserved
64
64
 
65
65
  = Warranty
66
66
  This package is provided "as is" and without any express or
data/lib/win32/nio.rb CHANGED
@@ -17,7 +17,7 @@ module Win32
17
17
  extend Windows::Macros
18
18
 
19
19
  # The version of the win32-nio library
20
- VERSION = '0.1.0'
20
+ VERSION = '0.1.1'
21
21
 
22
22
  # This method is similar to Ruby's IO.read method except that it uses
23
23
  # native function calls.
@@ -3,21 +3,25 @@ require 'ffi'
3
3
  module Windows
4
4
  module Functions
5
5
  extend FFI::Library
6
+ typedef :ulong, :dword
7
+ typedef :uintptr_t, :handle
8
+ typedef :pointer, :ptr
9
+
6
10
  ffi_lib :kernel32
7
11
  ffi_convention :stdcall
8
12
 
9
- attach_function :CloseHandle, [:long], :bool
10
- attach_function :CreateFileA, [:string, :ulong, :ulong, :pointer, :ulong, :ulong, :ulong], :ulong
11
- attach_function :CreateFileW, [:buffer_in, :ulong, :ulong, :pointer, :ulong, :ulong, :ulong], :ulong
12
- attach_function :GetOverlappedResult, [:ulong, :pointer, :pointer, :bool], :bool
13
- attach_function :GetSystemInfo, [:pointer], :void
14
- attach_function :ReadFile, [:ulong, :buffer_out, :ulong, :pointer, :pointer], :bool
15
- attach_function :ReadFileScatter, [:ulong, :pointer, :ulong, :pointer, :pointer], :bool
16
- attach_function :SleepEx, [:ulong, :bool], :ulong
17
- attach_function :VirtualAlloc, [:pointer, :size_t, :ulong, :ulong], :ulong
18
- attach_function :VirtualFree, [:ulong, :size_t, :ulong], :bool
13
+ attach_function :CloseHandle, [:handle], :bool
14
+ attach_function :CreateFileA, [:string, :dword, :dword, :ptr, :dword, :dword, :handle], :handle
15
+ attach_function :CreateFileW, [:buffer_in, :dword, :dword, :ptr, :dword, :dword, :handle], :handle
16
+ attach_function :GetOverlappedResult, [:handle, :ptr, :ptr, :bool], :bool
17
+ attach_function :GetSystemInfo, [:ptr], :void
18
+ attach_function :ReadFile, [:handle, :buffer_out, :dword, :ptr, :ptr], :bool
19
+ attach_function :ReadFileScatter, [:handle, :ptr, :dword, :ptr, :ptr], :bool
20
+ attach_function :SleepEx, [:dword, :bool], :dword
21
+ attach_function :VirtualAlloc, [:ptr, :size_t, :dword, :dword], :dword
22
+ attach_function :VirtualFree, [:dword, :size_t, :dword], :bool
19
23
 
20
- callback :completion_function, [:ulong, :ulong, :pointer], :void
21
- attach_function :ReadFileEx, [:ulong, :buffer_out, :ulong, :pointer, :completion_function], :bool
24
+ callback :completion_function, [:dword, :dword, :ptr], :void
25
+ attach_function :ReadFileEx, [:handle, :buffer_out, :dword, :ptr, :completion_function], :bool
22
26
  end
23
27
  end
@@ -25,7 +25,7 @@ class TC_Win32_NIO_Read < Test::Unit::TestCase
25
25
  end
26
26
 
27
27
  test "version number is set to expected value" do
28
- assert_equal('0.1.0', Win32::NIO::VERSION)
28
+ assert_equal('0.1.1', Win32::NIO::VERSION)
29
29
  end
30
30
 
31
31
  test "read method basic functionality" do
data/win32-nio.gemspec CHANGED
@@ -2,11 +2,11 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-nio'
5
- spec.version = '0.1.0'
5
+ spec.version = '0.1.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-nio'
10
10
  spec.summary = 'Native IO for MS Windows'
11
11
  spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-nio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.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-09 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: ffi
@@ -84,7 +84,7 @@ files:
84
84
  - test/test_win32_nio_read.rb
85
85
  - test/test_win32_nio_readlines.rb
86
86
  - win32-nio.gemspec
87
- homepage: http://www.rubyforge.org/projects/win32utils
87
+ homepage: https://github.com/djberg96/win32-nio
88
88
  licenses:
89
89
  - Artistic 2.0
90
90
  post_install_message: