ffi 1.4.0 → 1.4.1.dev
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/ext/ffi_c/Function.c +2 -1
- data/ext/ffi_c/FunctionInfo.c +1 -1
- data/ext/ffi_c/Thread.c +1 -0
- data/ext/ffi_c/Variadic.c +1 -1
- data/ext/ffi_c/extconf.rb +3 -1
- data/ffi.gemspec +1 -1
- metadata +73 -64
data/ext/ffi_c/Function.c
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
#include <sys/types.h>
|
27
27
|
#ifndef _WIN32
|
28
28
|
# include <sys/mman.h>
|
29
|
+
# include <unistd.h>
|
29
30
|
#endif
|
30
31
|
#include <stdio.h>
|
31
32
|
#ifndef _MSC_VER
|
@@ -460,7 +461,7 @@ callback_invoke(ffi_cif* cif, void* retval, void** parameters, void* user_data)
|
|
460
461
|
|
461
462
|
if (rbffi_thread_has_gvl_p()) {
|
462
463
|
rbffi_active_thread.exc = Qnil;
|
463
|
-
rb_rescue2(callback_with_gvl, &cb, save_callback_exception, &cb, rb_eException, (VALUE) 0);
|
464
|
+
rb_rescue2(callback_with_gvl, (VALUE) &cb, save_callback_exception, (VALUE) &cb, rb_eException, (VALUE) 0);
|
464
465
|
|
465
466
|
#if defined(DEFER_ASYNC_CALLBACK) && !defined(_WIN32)
|
466
467
|
} else {
|
data/ext/ffi_c/FunctionInfo.c
CHANGED
@@ -171,7 +171,7 @@ fntype_initialize(int argc, VALUE* argv, VALUE self)
|
|
171
171
|
fnInfo->ffiReturnType = fnInfo->returnType->ffiType;
|
172
172
|
|
173
173
|
|
174
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
174
|
+
#if (defined(_WIN32) || defined(__WIN32__)) && defined(FFI_STDCALL)
|
175
175
|
rbConventionStr = (rbConvention != Qnil) ? rb_funcall2(rbConvention, rb_intern("to_s"), 0, NULL) : Qnil;
|
176
176
|
fnInfo->abi = (rbConventionStr != Qnil && strcmp(StringValueCStr(rbConventionStr), "stdcall") == 0)
|
177
177
|
? FFI_STDCALL : FFI_DEFAULT_ABI;
|
data/ext/ffi_c/Thread.c
CHANGED
data/ext/ffi_c/Variadic.c
CHANGED
@@ -107,7 +107,7 @@ variadic_initialize(VALUE self, VALUE rbFunction, VALUE rbParameterTypes, VALUE
|
|
107
107
|
invoker->rbAddress = rbFunction;
|
108
108
|
invoker->function = rbffi_AbstractMemory_Cast(rbFunction, rbffi_PointerClass)->address;
|
109
109
|
|
110
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
110
|
+
#if (defined(_WIN32) || defined(__WIN32__)) && defined(FFI_STDCALL)
|
111
111
|
rbConventionStr = rb_funcall2(convention, rb_intern("to_s"), 0, NULL);
|
112
112
|
invoker->abi = (RTEST(convention) && strcmp(StringValueCStr(rbConventionStr), "stdcall") == 0)
|
113
113
|
? FFI_STDCALL : FFI_DEFAULT_ABI;
|
data/ext/ffi_c/extconf.rb
CHANGED
@@ -9,7 +9,9 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
9
9
|
$warnflags = ''
|
10
10
|
$CFLAGS.gsub!(/-ansi/, '')
|
11
11
|
$CFLAGS.gsub!(/-std=[^\s]+/, '')
|
12
|
-
|
12
|
+
# solaris needs -c99 for <stdbool.h>
|
13
|
+
$CFLAGS << " -std=c99" if RbConfig::CONFIG['host_os'] =~ /solaris/
|
14
|
+
|
13
15
|
if ENV['RUBY_CC_VERSION'].nil? && (pkg_config("libffi") ||
|
14
16
|
have_header("ffi.h") ||
|
15
17
|
find_header("ffi.h", "/usr/local/include", "/usr/include/ffi"))
|
data/ffi.gemspec
CHANGED
metadata
CHANGED
@@ -1,71 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: true
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 4
|
8
|
+
- 1
|
9
|
+
- dev
|
10
|
+
version: 1.4.1.dev
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Wayne Meissner
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2013-03-05 00:00:00 +10:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
15
22
|
name: rake
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
23
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
name: rake-compiler
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: 0.6.0
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
38
31
|
type: :development
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake-compiler
|
39
35
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
segments:
|
41
|
+
- 0
|
42
|
+
- 6
|
43
|
+
- 0
|
45
44
|
version: 0.6.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: rspec
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
45
|
type: :development
|
46
|
+
version_requirements: *id002
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
55
49
|
prerelease: false
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
50
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id003
|
62
59
|
description: Ruby FFI library
|
63
60
|
email: wmeissner@gmail.com
|
64
61
|
executables: []
|
65
|
-
|
62
|
+
|
63
|
+
extensions:
|
66
64
|
- ext/ffi_c/extconf.rb
|
67
65
|
extra_rdoc_files: []
|
68
|
-
|
66
|
+
|
67
|
+
files:
|
69
68
|
- ffi.gemspec
|
70
69
|
- History.txt
|
71
70
|
- LICENSE
|
@@ -500,30 +499,40 @@ files:
|
|
500
499
|
- libtest/StructTest.c
|
501
500
|
- libtest/UnionTest.c
|
502
501
|
- libtest/VariadicTest.c
|
502
|
+
has_rdoc: true
|
503
503
|
homepage: http://wiki.github.com/ffi/ffi
|
504
|
-
licenses:
|
504
|
+
licenses:
|
505
505
|
- LGPL-3
|
506
506
|
post_install_message:
|
507
507
|
rdoc_options: []
|
508
|
-
|
508
|
+
|
509
|
+
require_paths:
|
509
510
|
- lib
|
510
511
|
- ext/ffi_c
|
511
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
512
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
513
|
+
requirements:
|
514
|
+
- - ">="
|
515
|
+
- !ruby/object:Gem::Version
|
516
|
+
segments:
|
517
|
+
- 1
|
518
|
+
- 8
|
519
|
+
- 7
|
516
520
|
version: 1.8.7
|
517
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
521
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
522
|
+
requirements:
|
523
|
+
- - ">"
|
524
|
+
- !ruby/object:Gem::Version
|
525
|
+
segments:
|
526
|
+
- 1
|
527
|
+
- 3
|
528
|
+
- 1
|
529
|
+
version: 1.3.1
|
523
530
|
requirements: []
|
531
|
+
|
524
532
|
rubyforge_project:
|
525
|
-
rubygems_version: 1.
|
533
|
+
rubygems_version: 1.3.6
|
526
534
|
signing_key:
|
527
535
|
specification_version: 3
|
528
536
|
summary: Ruby FFI
|
529
537
|
test_files: []
|
538
|
+
|