ffi 1.8.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ffi might be problematic. Click here for more details.
- data/Rakefile +2 -1
- data/ext/ffi_c/ClosurePool.c +6 -6
- data/ext/ffi_c/Thread.c +1 -1
- data/ext/ffi_c/extconf.rb +0 -1
- data/lib/ffi/platform/{i486-gnu → i386-gnu}/types.conf +0 -0
- data/lib/ffi/platform/i386-openbsd/types.conf +2 -0
- data/lib/ffi/platform/x86_64-openbsd/types.conf +2 -0
- data/lib/ffi/version.rb +1 -1
- metadata +95 -71
- checksums.yaml +0 -7
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rubygems/package_task'
|
3
3
|
require 'rubygems/tasks'
|
4
4
|
require 'rbconfig'
|
5
|
+
require 'rake/clean'
|
5
6
|
|
6
7
|
USE_RAKE_COMPILER = (RUBY_PLATFORM =~ /java/) ? false : true
|
7
8
|
if USE_RAKE_COMPILER
|
@@ -197,7 +198,7 @@ if USE_RAKE_COMPILER
|
|
197
198
|
|
198
199
|
task "copy:ffi_c:x64-mingw32:#{ruby_version}" do |t|
|
199
200
|
if File.exists?("#{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so")
|
200
|
-
sh "x86_64-w64-mingw32-strip -S #{
|
201
|
+
sh "x86_64-w64-mingw32-strip -S #{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
201
202
|
end
|
202
203
|
end
|
203
204
|
end
|
data/ext/ffi_c/ClosurePool.c
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
#include <sys/param.h>
|
22
22
|
#endif
|
23
23
|
#include <sys/types.h>
|
24
|
-
#
|
24
|
+
#if defined(__CYGWIN__) || !defined(_WIN32)
|
25
25
|
# include <sys/mman.h>
|
26
26
|
#endif
|
27
27
|
#include <stdio.h>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
# include "win32/stdbool.h"
|
33
33
|
# include "win32/stdint.h"
|
34
34
|
#endif
|
35
|
-
#
|
35
|
+
#if defined(__CYGWIN__) || !defined(_WIN32)
|
36
36
|
# include <unistd.h>
|
37
37
|
#else
|
38
38
|
# include <winsock2.h>
|
@@ -225,7 +225,7 @@ rbffi_Closure_CodeAddress(Closure* handle)
|
|
225
225
|
static long
|
226
226
|
getPageSize()
|
227
227
|
{
|
228
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
228
|
+
#if !defined(__CYGWIN__) && (defined(_WIN32) || defined(__WIN32__))
|
229
229
|
SYSTEM_INFO si;
|
230
230
|
GetSystemInfo(&si);
|
231
231
|
return si.dwPageSize;
|
@@ -237,7 +237,7 @@ getPageSize()
|
|
237
237
|
static void*
|
238
238
|
allocatePage(void)
|
239
239
|
{
|
240
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
240
|
+
#if !defined(__CYGWIN__) && (defined(_WIN32) || defined(__WIN32__))
|
241
241
|
return VirtualAlloc(NULL, pageSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
242
242
|
#else
|
243
243
|
caddr_t page = mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
@@ -248,7 +248,7 @@ allocatePage(void)
|
|
248
248
|
static bool
|
249
249
|
freePage(void *addr)
|
250
250
|
{
|
251
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
251
|
+
#if !defined(__CYGWIN__) && (defined(_WIN32) || defined(__WIN32__))
|
252
252
|
return VirtualFree(addr, 0, MEM_RELEASE);
|
253
253
|
#else
|
254
254
|
return munmap(addr, pageSize) == 0;
|
@@ -258,7 +258,7 @@ freePage(void *addr)
|
|
258
258
|
static bool
|
259
259
|
protectPage(void* page)
|
260
260
|
{
|
261
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
261
|
+
#if !defined(__CYGWIN__) && (defined(_WIN32) || defined(__WIN32__))
|
262
262
|
DWORD oldProtect;
|
263
263
|
return VirtualProtect(page, pageSize, PAGE_EXECUTE_READ, &oldProtect);
|
264
264
|
#else
|
data/ext/ffi_c/Thread.c
CHANGED
data/ext/ffi_c/extconf.rb
CHANGED
@@ -36,7 +36,6 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
36
36
|
|
37
37
|
create_header
|
38
38
|
|
39
|
-
$CFLAGS << " -mwin32 " if RbConfig::CONFIG['host_os'] =~ /cygwin/
|
40
39
|
$LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if RbConfig::CONFIG['host_os'] =~ /mswin/
|
41
40
|
|
42
41
|
create_makefile("ffi_c")
|
File without changes
|
@@ -82,6 +82,8 @@ rbx.platform.typedef.int32_t = int
|
|
82
82
|
rbx.platform.typedef.uint32_t = uint
|
83
83
|
rbx.platform.typedef.int64_t = long_long
|
84
84
|
rbx.platform.typedef.uint64_t = ulong_long
|
85
|
+
rbx.platform.typedef.intptr_t = long
|
86
|
+
rbx.platform.typedef.uintptr_t = ulong
|
85
87
|
rbx.platform.typedef.u_int8_t = uchar
|
86
88
|
rbx.platform.typedef.u_int16_t = ushort
|
87
89
|
rbx.platform.typedef.u_int32_t = uint
|
@@ -82,6 +82,8 @@ rbx.platform.typedef.int32_t = int
|
|
82
82
|
rbx.platform.typedef.uint32_t = uint
|
83
83
|
rbx.platform.typedef.int64_t = long_long
|
84
84
|
rbx.platform.typedef.uint64_t = ulong_long
|
85
|
+
rbx.platform.typedef.intptr_t = long
|
86
|
+
rbx.platform.typedef.uintptr_t = ulong
|
85
87
|
rbx.platform.typedef.u_int8_t = uchar
|
86
88
|
rbx.platform.typedef.u_int16_t = ushort
|
87
89
|
rbx.platform.typedef.u_int32_t = uint
|
data/lib/ffi/version.rb
CHANGED
metadata
CHANGED
@@ -1,78 +1,90 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 51
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 9
|
9
|
+
- 0
|
10
|
+
version: 1.9.0
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Wayne Meissner
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2013-06-10 00:00:00 +10:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
14
22
|
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
23
|
prerelease: false
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.6.0
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
34
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake-compiler
|
35
37
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 7
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
- 6
|
47
|
+
- 0
|
40
48
|
version: 0.6.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
49
|
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rspec
|
49
53
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
62
63
|
type: :development
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: rubygems-tasks
|
63
67
|
prerelease: false
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
type: :development
|
78
|
+
version_requirements: *id004
|
69
79
|
description: Ruby FFI library
|
70
80
|
email: wmeissner@gmail.com
|
71
81
|
executables: []
|
72
|
-
|
82
|
+
|
83
|
+
extensions:
|
73
84
|
- ext/ffi_c/extconf.rb
|
74
85
|
extra_rdoc_files: []
|
75
|
-
|
86
|
+
|
87
|
+
files:
|
76
88
|
- ffi.gemspec
|
77
89
|
- History.txt
|
78
90
|
- LICENSE
|
@@ -425,12 +437,12 @@ files:
|
|
425
437
|
- lib/ffi/platform/i386-cygwin/types.conf
|
426
438
|
- lib/ffi/platform/i386-darwin/types.conf
|
427
439
|
- lib/ffi/platform/i386-freebsd/types.conf
|
440
|
+
- lib/ffi/platform/i386-gnu/types.conf
|
428
441
|
- lib/ffi/platform/i386-linux/types.conf
|
429
442
|
- lib/ffi/platform/i386-netbsd/types.conf
|
430
443
|
- lib/ffi/platform/i386-openbsd/types.conf
|
431
444
|
- lib/ffi/platform/i386-solaris/types.conf
|
432
445
|
- lib/ffi/platform/i386-windows/types.conf
|
433
|
-
- lib/ffi/platform/i486-gnu/types.conf
|
434
446
|
- lib/ffi/platform/ia64-linux/types.conf
|
435
447
|
- lib/ffi/platform/mips-linux/types.conf
|
436
448
|
- lib/ffi/platform/mipsel-linux/types.conf
|
@@ -512,31 +524,43 @@ files:
|
|
512
524
|
- libtest/StructTest.c
|
513
525
|
- libtest/UnionTest.c
|
514
526
|
- libtest/VariadicTest.c
|
527
|
+
has_rdoc: true
|
515
528
|
homepage: http://wiki.github.com/ffi/ffi
|
516
|
-
licenses:
|
529
|
+
licenses:
|
517
530
|
- LGPL-3
|
518
|
-
metadata: {}
|
519
531
|
post_install_message:
|
520
|
-
rdoc_options:
|
532
|
+
rdoc_options:
|
521
533
|
- --exclude=ext/ffi_c/.*\.o$
|
522
534
|
- --exclude=ffi_c\.(bundle|so)$
|
523
|
-
require_paths:
|
535
|
+
require_paths:
|
524
536
|
- lib
|
525
537
|
- ext/ffi_c
|
526
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
527
|
-
|
528
|
-
|
529
|
-
|
538
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
539
|
+
none: false
|
540
|
+
requirements:
|
541
|
+
- - ">="
|
542
|
+
- !ruby/object:Gem::Version
|
543
|
+
hash: 57
|
544
|
+
segments:
|
545
|
+
- 1
|
546
|
+
- 8
|
547
|
+
- 7
|
530
548
|
version: 1.8.7
|
531
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
549
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
550
|
+
none: false
|
551
|
+
requirements:
|
552
|
+
- - ">="
|
553
|
+
- !ruby/object:Gem::Version
|
554
|
+
hash: 3
|
555
|
+
segments:
|
556
|
+
- 0
|
557
|
+
version: "0"
|
536
558
|
requirements: []
|
559
|
+
|
537
560
|
rubyforge_project:
|
538
|
-
rubygems_version:
|
561
|
+
rubygems_version: 1.6.2
|
539
562
|
signing_key:
|
540
|
-
specification_version:
|
563
|
+
specification_version: 3
|
541
564
|
summary: Ruby FFI
|
542
565
|
test_files: []
|
566
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: b18df2604943c2ffa28b49b8154664b58572779f
|
4
|
-
data.tar.gz: 383c237370cf383b21f64af209e2798307845758
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: ee8047e83a5454166bfbda7041e096ec045c4ca8dc9315ce6e0a3aae70ce5b0f417a98f351d105e1bbf0460a803b527d71ad0f8f4040003ce614ad981aca52d9
|
7
|
-
data.tar.gz: a5bd97cc92544ff52295318226cda8956bb3214fab36f0f40d31efe1cd457259f2e24f74ade72f3ccb8508ee67eee0d2d73cc58a70978e89ad0196f4e62c6d75
|