win32-api 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/Rakefile +1 -1
- data/ext/win32/api.c +4 -4
- data/test/test_win32_api.rb +3 -3
- data/win32-api.gemspec +1 -1
- metadata +2 -2
data/CHANGES
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== 1.4.5 - 24-Aug-2009
|
2
|
+
* Reverted the change in 1.4.4. We need unsigned longs in a few cases.
|
3
|
+
Consequently, you should upgrade windows-pr to 1.0.8 or later because
|
4
|
+
some return values were set to -1 instead of 0xFFFFFFFF as they are now.
|
5
|
+
* Updated one test to validate return value from failed function.
|
6
|
+
|
1
7
|
== 1.4.4 - 18-Aug-2009
|
2
8
|
* Fixed a bug where functions that returned a long return type were unsigned
|
3
9
|
instead of signed.
|
data/Rakefile
CHANGED
@@ -69,7 +69,7 @@ task :build_binary_gem => [:build] do
|
|
69
69
|
|
70
70
|
spec = Gem::Specification.new do |gem|
|
71
71
|
gem.name = 'win32-api'
|
72
|
-
gem.version = '1.4.
|
72
|
+
gem.version = '1.4.5'
|
73
73
|
gem.authors = ['Daniel J. Berger', 'Park Heesob']
|
74
74
|
gem.license = 'Artistic 2.0'
|
75
75
|
gem.email = 'djberg96@gmail.com'
|
data/ext/win32/api.c
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
#endif
|
18
18
|
|
19
19
|
#define MAX_BUF 1024
|
20
|
-
#define WINDOWS_API_VERSION "1.4.
|
20
|
+
#define WINDOWS_API_VERSION "1.4.5"
|
21
21
|
|
22
22
|
#define _T_VOID 0
|
23
23
|
#define _T_LONG 1
|
@@ -740,7 +740,7 @@ void *find_callback(VALUE obj,int len)
|
|
740
740
|
static VALUE api_call(int argc, VALUE* argv, VALUE self){
|
741
741
|
VALUE v_proto, v_args, v_arg, v_return;
|
742
742
|
Win32API* ptr;
|
743
|
-
long return_value;
|
743
|
+
unsigned long return_value;
|
744
744
|
int i = 0;
|
745
745
|
int len;
|
746
746
|
|
@@ -823,7 +823,7 @@ static VALUE api_call(int argc, VALUE* argv, VALUE self){
|
|
823
823
|
v_return = INT2NUM(return_value);
|
824
824
|
break;
|
825
825
|
case _T_LONG:
|
826
|
-
v_return =
|
826
|
+
v_return = ULONG2NUM(return_value);
|
827
827
|
break;
|
828
828
|
case _T_VOID:
|
829
829
|
v_return = Qnil;
|
@@ -943,6 +943,6 @@ void Init_api(){
|
|
943
943
|
|
944
944
|
/* Constants */
|
945
945
|
|
946
|
-
/* 1.4.
|
946
|
+
/* 1.4.5: The version of the win32-api library */
|
947
947
|
rb_define_const(cAPI, "VERSION", rb_str_new2(WINDOWS_API_VERSION));
|
948
948
|
}
|
data/test/test_win32_api.rb
CHANGED
@@ -21,7 +21,7 @@ class TC_Win32_API < Test::Unit::TestCase
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def test_version
|
24
|
-
assert_equal('1.4.
|
24
|
+
assert_equal('1.4.5', API::VERSION)
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_constructor_basic
|
@@ -42,8 +42,8 @@ class TC_Win32_API < Test::Unit::TestCase
|
|
42
42
|
assert_nothing_raised{ @gle.call(nil) }
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
46
|
-
assert_equal(
|
45
|
+
def test_call_return_value_on_failure
|
46
|
+
assert_equal(0xFFFFFFFF, @gfa.call('C:/foobarbazblah'))
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_dll_name
|
data/win32-api.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-08-
|
13
|
+
date: 2009-08-24 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|