win32-api 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGES +7 -0
  2. data/ext/win32/api.c +2 -2
  3. data/test/tc_win32_api.rb +7 -1
  4. metadata +2 -2
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ = 1.0.2 - 28-Sep-2007
2
+ * Fixed a bug in an internal struct member that was causing segfaults. Thanks
3
+ go to Lars Olsson for the spot.
4
+ * Fixed the 'install' task in the Rakefile. This only affected native builds,
5
+ not the prebuilt binary.
6
+ * Added a few more tests.
7
+
1
8
  = 1.0.1 - 27-Sep-2007
2
9
  * Functions declared with a void prototype no longer require an explicit nil
3
10
  argument to fulfill the arity requirement. You can still call them with an
data/ext/win32/api.c CHANGED
@@ -2,7 +2,7 @@
2
2
  #include <windows.h>
3
3
 
4
4
  #define MAX_BUF 1024
5
- #define WINDOWS_API_VERSION "1.0.1"
5
+ #define WINDOWS_API_VERSION "1.0.2"
6
6
 
7
7
  #define _T_VOID 0
8
8
  #define _T_LONG 1
@@ -104,7 +104,7 @@ typedef struct {
104
104
  HANDLE library;
105
105
  FARPROC function;
106
106
  int return_type;
107
- int prototype[];
107
+ int prototype[16];
108
108
  } Win32API;
109
109
 
110
110
  static void api_free(Win32API* ptr){
data/test/tc_win32_api.rb CHANGED
@@ -16,7 +16,7 @@ class TC_Win32_API < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  def test_version
19
- assert_equal('1.0.1', API::VERSION)
19
+ assert_equal('1.0.2', API::VERSION)
20
20
  end
21
21
 
22
22
  def test_call
@@ -50,6 +50,12 @@ class TC_Win32_API < Test::Unit::TestCase
50
50
  assert_equal('L', @api.return_type)
51
51
  end
52
52
 
53
+ def test_constructor_high_iteration
54
+ 1000.times{
55
+ assert_nothing_raised{ API.new('GetUserName', 'P', 'P', 'advapi32') }
56
+ }
57
+ end
58
+
53
59
  def test_constructor_expected_failures
54
60
  assert_raise(API::Error){ API.new('GetUserName', 'PL', 'I', 'foo') }
55
61
  assert_raise(API::Error){ API.new('GetUserName', 'X', 'I', 'foo') }
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: win32-api
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.1
7
- date: 2007-09-27 00:00:00 -06:00
6
+ version: 1.0.2
7
+ date: 2007-09-28 00:00:00 -06:00
8
8
  summary: A superior replacement for Win32API
9
9
  require_paths:
10
10
  - lib