ffi 1.9.6 → 1.9.8

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.

@@ -3,6 +3,7 @@
3
3
  *
4
4
  * For licensing, see LICENSE.SPECS
5
5
  */
6
+ #include <stdint.h>
6
7
 
7
8
  int test_untagged_enum(int val) {
8
9
  return val;
@@ -12,6 +13,22 @@ int test_untagged_typedef_enum(int val) {
12
13
  return val;
13
14
  }
14
15
 
16
+ uint8_t test_untagged_nonint_enum(uint8_t val) {
17
+ return val;
18
+ }
19
+
20
+ uint16_t test_tagged_nonint_enum1(uint16_t val) {
21
+ return val;
22
+ }
23
+
24
+ uint32_t test_tagged_nonint_enum2(uint32_t val) {
25
+ return val;
26
+ }
27
+
28
+ uint64_t test_tagged_nonint_enum3(uint64_t val) {
29
+ return val;
30
+ }
31
+
15
32
  typedef enum {c1, c2, c3, c4} enum_type1;
16
33
  enum_type1 test_tagged_typedef_enum1(enum_type1 val) {
17
34
  return val;
@@ -64,10 +64,13 @@ describe FFI::Function do
64
64
 
65
65
  it 'can wrap a blocking function' do
66
66
  fp = FFI::Function.new(:void, [ :int ], @libtest.find_function('testBlocking'), :blocking => true)
67
- time = Time.now
68
- threads = []
69
- threads << Thread.new { fp.call(2) }
70
- threads << Thread.new(time) { expect(Time.now - time).to be < 1 }
67
+ threads = 10.times.map do |x|
68
+ Thread.new do
69
+ time = Time.now
70
+ fp.call(2)
71
+ expect(Time.now - time).to be >= 2
72
+ end
73
+ end
71
74
  threads.each { |t| t.join }
72
75
  end
73
76
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.6
4
+ version: 1.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Meissner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-09 00:00:00.000000000 Z
11
+ date: 2015-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -418,6 +418,7 @@ files:
418
418
  - lib/ffi/managedstruct.rb
419
419
  - lib/ffi/memorypointer.rb
420
420
  - lib/ffi/platform.rb
421
+ - lib/ffi/platform/aarch64-linux/types.conf
421
422
  - lib/ffi/platform/arm-linux/types.conf
422
423
  - lib/ffi/platform/i386-cygwin/types.conf
423
424
  - lib/ffi/platform/i386-darwin/types.conf
@@ -430,10 +431,12 @@ files:
430
431
  - lib/ffi/platform/i386-windows/types.conf
431
432
  - lib/ffi/platform/ia64-linux/types.conf
432
433
  - lib/ffi/platform/mips-linux/types.conf
434
+ - lib/ffi/platform/mips64el-linux/types.conf
433
435
  - lib/ffi/platform/mipsel-linux/types.conf
434
436
  - lib/ffi/platform/powerpc-aix/types.conf
435
437
  - lib/ffi/platform/powerpc-darwin/types.conf
436
438
  - lib/ffi/platform/powerpc-linux/types.conf
439
+ - lib/ffi/platform/powerpc64-linux/types.conf
437
440
  - lib/ffi/platform/s390-linux/types.conf
438
441
  - lib/ffi/platform/s390x-linux/types.conf
439
442
  - lib/ffi/platform/sparc-linux/types.conf
@@ -487,36 +490,21 @@ files:
487
490
  - spec/ffi/errno_spec.rb
488
491
  - spec/ffi/ffi_spec.rb
489
492
  - spec/ffi/fixtures/Benchmark.c
490
- - spec/ffi/fixtures/Benchmark.o
491
493
  - spec/ffi/fixtures/BoolTest.c
492
- - spec/ffi/fixtures/BoolTest.o
493
494
  - spec/ffi/fixtures/BufferTest.c
494
- - spec/ffi/fixtures/BufferTest.o
495
495
  - spec/ffi/fixtures/ClosureTest.c
496
- - spec/ffi/fixtures/ClosureTest.o
497
496
  - spec/ffi/fixtures/EnumTest.c
498
- - spec/ffi/fixtures/EnumTest.o
499
497
  - spec/ffi/fixtures/FunctionTest.c
500
- - spec/ffi/fixtures/FunctionTest.o
501
498
  - spec/ffi/fixtures/GNUmakefile
502
499
  - spec/ffi/fixtures/GlobalVariable.c
503
- - spec/ffi/fixtures/GlobalVariable.o
504
500
  - spec/ffi/fixtures/LastErrorTest.c
505
- - spec/ffi/fixtures/LastErrorTest.o
506
501
  - spec/ffi/fixtures/NumberTest.c
507
- - spec/ffi/fixtures/NumberTest.o
508
502
  - spec/ffi/fixtures/PointerTest.c
509
- - spec/ffi/fixtures/PointerTest.o
510
503
  - spec/ffi/fixtures/ReferenceTest.c
511
- - spec/ffi/fixtures/ReferenceTest.o
512
504
  - spec/ffi/fixtures/StringTest.c
513
- - spec/ffi/fixtures/StringTest.o
514
505
  - spec/ffi/fixtures/StructTest.c
515
- - spec/ffi/fixtures/StructTest.o
516
506
  - spec/ffi/fixtures/UnionTest.c
517
- - spec/ffi/fixtures/UnionTest.o
518
507
  - spec/ffi/fixtures/VariadicTest.c
519
- - spec/ffi/fixtures/VariadicTest.o
520
508
  - spec/ffi/fixtures/classes.rb
521
509
  - spec/ffi/function_spec.rb
522
510
  - spec/ffi/io_spec.rb
@@ -565,7 +553,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
565
553
  version: '0'
566
554
  requirements: []
567
555
  rubyforge_project:
568
- rubygems_version: 2.2.2
556
+ rubygems_version: 2.4.6
569
557
  signing_key:
570
558
  specification_version: 4
571
559
  summary: Ruby FFI
Binary file
Binary file