win32-api 1.0.2 → 1.0.3

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 +3 -0
  2. data/ext/extconf.rb +1 -1
  3. data/ext/win32/api.c +7 -3
  4. metadata +13 -6
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ = 1.0.3 - 28-Sep-2007
2
+ * Fixed a subtle but dangerous copy-on-write bug in the API#call method.
3
+
1
4
  = 1.0.2 - 28-Sep-2007
2
5
  * Fixed a bug in an internal struct member that was causing segfaults. Thanks
3
6
  go to Lars Olsson for the spot.
@@ -7,4 +7,4 @@
7
7
  require 'mkmf'
8
8
 
9
9
  have_func('strncpy_s')
10
- create_makefile('win32/api')
10
+ create_makefile('win32/api', 'win32')
@@ -2,7 +2,7 @@
2
2
  #include <windows.h>
3
3
 
4
4
  #define MAX_BUF 1024
5
- #define WINDOWS_API_VERSION "1.0.2"
5
+ #define WINDOWS_API_VERSION "1.0.3"
6
6
 
7
7
  #define _T_VOID 0
8
8
  #define _T_LONG 1
@@ -418,10 +418,14 @@ static VALUE api_call(int argc, VALUE* argv, VALUE self){
418
418
  param.params[i] = NUM2INT(v_arg);
419
419
  break;
420
420
  case _T_POINTER:
421
- if(FIXNUM_P(v_arg))
421
+ if(FIXNUM_P(v_arg)){
422
422
  param.params[i] = NUM2ULONG(v_arg);
423
- else
423
+ }
424
+ else{
425
+ StringValue(v_arg);
426
+ rb_str_modify(v_arg);
424
427
  param.params[i] = (unsigned long)StringValuePtr(v_arg);
428
+ }
425
429
  break;
426
430
  case _T_CALLBACK:
427
431
  ActiveCallback = v_arg;
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
2
+ rubygems_version: 0.9.4.5
3
+ specification_version: 2
4
4
  name: win32-api
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.2
7
- date: 2007-09-28 00:00:00 -06:00
6
+ version: 1.0.3
7
+ date: 2007-10-18 00:00:00 -06:00
8
8
  summary: A superior replacement for Win32API
9
9
  require_paths:
10
10
  - lib
@@ -16,15 +16,22 @@ autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
19
+ required_ruby_version: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.8.0
24
24
  version:
25
+ required_rubygems_version: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: "0"
30
+ version:
25
31
  platform: ruby
26
32
  signing_key:
27
- cert_chain:
33
+ cert_chain: []
34
+
28
35
  post_install_message:
29
36
  authors:
30
37
  - Daniel J. Berger