ffi 1.0.4-x86-mingw32 → 1.0.5-x86-mingw32

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.

Files changed (63) hide show
  1. data/Rakefile +2 -2
  2. data/ext/ffi_c/AbstractMemory.c +1 -1
  3. data/ext/ffi_c/ArrayType.c +11 -19
  4. data/ext/ffi_c/ArrayType.h +11 -19
  5. data/ext/ffi_c/Buffer.c +2 -0
  6. data/ext/ffi_c/Call.h +12 -19
  7. data/ext/ffi_c/ClosurePool.h +19 -0
  8. data/ext/ffi_c/DynamicLibrary.h +18 -0
  9. data/ext/ffi_c/Function.c +12 -13
  10. data/ext/ffi_c/Function.h +12 -19
  11. data/ext/ffi_c/LastError.c +12 -19
  12. data/ext/ffi_c/LastError.h +20 -0
  13. data/ext/ffi_c/MappedType.c +12 -19
  14. data/ext/ffi_c/MappedType.h +12 -19
  15. data/ext/ffi_c/MemoryPointer.c +1 -0
  16. data/ext/ffi_c/MemoryPointer.h +23 -3
  17. data/ext/ffi_c/MethodHandle.h +15 -22
  18. data/ext/ffi_c/Platform.c +36 -9
  19. data/ext/ffi_c/Platform.h +23 -3
  20. data/ext/ffi_c/Pointer.c +2 -0
  21. data/ext/ffi_c/Pointer.h +11 -19
  22. data/ext/ffi_c/Struct.c +12 -19
  23. data/ext/ffi_c/Struct.h +11 -19
  24. data/ext/ffi_c/StructByValue.c +13 -19
  25. data/ext/ffi_c/StructByValue.h +12 -19
  26. data/ext/ffi_c/StructLayout.c +12 -19
  27. data/ext/ffi_c/Thread.c +36 -10
  28. data/ext/ffi_c/Thread.h +14 -5
  29. data/ext/ffi_c/Type.c +1 -0
  30. data/ext/ffi_c/Types.c +12 -19
  31. data/ext/ffi_c/Types.h +11 -19
  32. data/ext/ffi_c/Variadic.c +1 -1
  33. data/ext/ffi_c/compat.h +13 -19
  34. data/ext/ffi_c/endian.h +1 -0
  35. data/ext/ffi_c/extconf.rb +3 -1
  36. data/ext/ffi_c/ffi.c +12 -19
  37. data/ext/ffi_c/rbffi.h +23 -3
  38. data/lib/1.8/ffi_c.so +0 -0
  39. data/lib/1.9/ffi_c.so +0 -0
  40. data/lib/ffi/tools/const_generator.rb +1 -1
  41. data/spec/ffi/async_callback_spec.rb +35 -12
  42. data/spec/ffi/bool_spec.rb +16 -0
  43. data/spec/ffi/buffer_spec.rb +34 -21
  44. data/spec/ffi/callback_spec.rb +16 -0
  45. data/spec/ffi/custom_param_type.rb +16 -0
  46. data/spec/ffi/custom_type_spec.rb +16 -0
  47. data/spec/ffi/enum_spec.rb +16 -0
  48. data/spec/ffi/errno_spec.rb +16 -0
  49. data/spec/ffi/ffi_spec.rb +16 -0
  50. data/spec/ffi/library_spec.rb +16 -0
  51. data/spec/ffi/managed_struct_spec.rb +16 -0
  52. data/spec/ffi/number_spec.rb +16 -0
  53. data/spec/ffi/strptr_spec.rb +16 -0
  54. data/spec/ffi/struct_callback_spec.rb +16 -0
  55. data/spec/ffi/struct_initialize_spec.rb +1 -0
  56. data/spec/ffi/struct_packed_spec.rb +16 -0
  57. data/spec/ffi/struct_spec.rb +16 -0
  58. data/spec/ffi/typedef_spec.rb +16 -0
  59. data/spec/ffi/union_spec.rb +16 -0
  60. data/spec/ffi/variadic_spec.rb +16 -0
  61. data/tasks/extension.rake +1 -1
  62. metadata +11 -24
  63. data/lib/ffi_c.so +0 -0
@@ -1,22 +1,35 @@
1
- require "rubygems"
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
2
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
3
- include FFI
4
- LongSize = FFI::Platform::LONG_SIZE / 8
5
18
 
6
19
  describe "Buffer#total" do
7
20
  [1,2,3].each do |i|
8
21
  { :char => 1, :uchar => 1, :short => 2, :ushort => 2, :int => 4,
9
- :uint => 4, :long => LongSize, :ulong => LongSize,
22
+ :uint => 4, :long => FFI::Type::LONG.size, :ulong => FFI::Type::ULONG.size,
10
23
  :long_long => 8, :ulong_long => 8, :float => 4, :double => 8
11
24
  }.each_pair do |t, s|
12
25
  it "Buffer.alloc_in(#{t}, #{i}).total == #{i * s}" do
13
- Buffer.alloc_in(t, i).total.should == i * s
26
+ FFI::Buffer.alloc_in(t, i).total.should == i * s
14
27
  end
15
28
  it "Buffer.alloc_out(#{t}, #{i}).total == #{i * s}" do
16
- Buffer.alloc_out(t, i).total.should == i * s
29
+ FFI::Buffer.alloc_out(t, i).total.should == i * s
17
30
  end
18
31
  it "Buffer.alloc_inout(#{t}, #{i}).total == #{i * s}" do
19
- Buffer.alloc_inout(t, i).total.should == i * s
32
+ FFI::Buffer.alloc_inout(t, i).total.should == i * s
20
33
  end
21
34
  end
22
35
  end
@@ -27,7 +40,7 @@ describe "Buffer#put_char" do
27
40
  (0..127).each do |i|
28
41
  (0..bufsize-1).each do |offset|
29
42
  it "put_char(#{offset}, #{i}).get_char(#{offset}) == #{i}" do
30
- Buffer.alloc_in(bufsize).put_char(offset, i).get_char(offset).should == i
43
+ FFI::Buffer.alloc_in(bufsize).put_char(offset, i).get_char(offset).should == i
31
44
  end
32
45
  end
33
46
  end
@@ -37,7 +50,7 @@ describe "Buffer#put_uchar" do
37
50
  (0..255).each do |i|
38
51
  (0..bufsize-1).each do |offset|
39
52
  it "Buffer.put_uchar(#{offset}, #{i}).get_uchar(#{offset}) == #{i}" do
40
- Buffer.alloc_in(bufsize).put_uchar(offset, i).get_uchar(offset).should == i
53
+ FFI::Buffer.alloc_in(bufsize).put_uchar(offset, i).get_uchar(offset).should == i
41
54
  end
42
55
  end
43
56
  end
@@ -47,7 +60,7 @@ describe "Buffer#put_short" do
47
60
  [0, 1, 128, 32767].each do |i|
48
61
  (0..bufsize-2).each do |offset|
49
62
  it "put_short(#{offset}, #{i}).get_short(#{offset}) == #{i}" do
50
- Buffer.alloc_in(bufsize).put_short(offset, i).get_short(offset).should == i
63
+ FFI::Buffer.alloc_in(bufsize).put_short(offset, i).get_short(offset).should == i
51
64
  end
52
65
  end
53
66
  end
@@ -57,7 +70,7 @@ describe "Buffer#put_ushort" do
57
70
  [ 0, 1, 128, 32767, 65535, 0xfee1, 0xdead, 0xbeef, 0xcafe ].each do |i|
58
71
  (0..bufsize-2).each do |offset|
59
72
  it "put_ushort(#{offset}, #{i}).get_ushort(#{offset}) == #{i}" do
60
- Buffer.alloc_in(bufsize).put_ushort(offset, i).get_ushort(offset).should == i
73
+ FFI::Buffer.alloc_in(bufsize).put_ushort(offset, i).get_ushort(offset).should == i
61
74
  end
62
75
  end
63
76
  end
@@ -67,7 +80,7 @@ describe "Buffer#put_int" do
67
80
  [0, 1, 128, 32767, 0x7ffffff ].each do |i|
68
81
  (0..bufsize-4).each do |offset|
69
82
  it "put_int(#{offset}, #{i}).get_int(#{offset}) == #{i}" do
70
- Buffer.alloc_in(bufsize).put_int(offset, i).get_int(offset).should == i
83
+ FFI::Buffer.alloc_in(bufsize).put_int(offset, i).get_int(offset).should == i
71
84
  end
72
85
  end
73
86
  end
@@ -77,7 +90,7 @@ describe "Buffer#put_uint" do
77
90
  [ 0, 1, 128, 32767, 65535, 0xfee1dead, 0xcafebabe, 0xffffffff ].each do |i|
78
91
  (0..bufsize-4).each do |offset|
79
92
  it "put_uint(#{offset}, #{i}).get_uint(#{offset}) == #{i}" do
80
- Buffer.alloc_in(bufsize).put_uint(offset, i).get_uint(offset).should == i
93
+ FFI::Buffer.alloc_in(bufsize).put_uint(offset, i).get_uint(offset).should == i
81
94
  end
82
95
  end
83
96
  end
@@ -85,9 +98,9 @@ end
85
98
  describe "Buffer#put_long" do
86
99
  bufsize = 16
87
100
  [0, 1, 128, 32767, 0x7ffffff ].each do |i|
88
- (0..bufsize-LongSize).each do |offset|
101
+ (0..bufsize-FFI::Type::LONG.size).each do |offset|
89
102
  it "put_long(#{offset}, #{i}).get_long(#{offset}) == #{i}" do
90
- Buffer.alloc_in(bufsize).put_long(offset, i).get_long(offset).should == i
103
+ FFI::Buffer.alloc_in(bufsize).put_long(offset, i).get_long(offset).should == i
91
104
  end
92
105
  end
93
106
  end
@@ -95,9 +108,9 @@ end
95
108
  describe "Buffer#put_ulong" do
96
109
  bufsize = 16
97
110
  [ 0, 1, 128, 32767, 65535, 0xfee1dead, 0xcafebabe, 0xffffffff ].each do |i|
98
- (0..bufsize-LongSize).each do |offset|
111
+ (0..bufsize-FFI::Type::LONG.size).each do |offset|
99
112
  it "put_ulong(#{offset}, #{i}).get_ulong(#{offset}) == #{i}" do
100
- Buffer.alloc_in(bufsize).put_ulong(offset, i).get_ulong(offset).should == i
113
+ FFI::Buffer.alloc_in(bufsize).put_ulong(offset, i).get_ulong(offset).should == i
101
114
  end
102
115
  end
103
116
  end
@@ -107,7 +120,7 @@ describe "Buffer#put_long_long" do
107
120
  [0, 1, 128, 32767, 0x7ffffffffffffff ].each do |i|
108
121
  (0..bufsize-8).each do |offset|
109
122
  it "put_long_long(#{offset}, #{i}).get_long_long(#{offset}) == #{i}" do
110
- Buffer.alloc_in(bufsize).put_long_long(offset, i).get_long_long(offset).should == i
123
+ FFI::Buffer.alloc_in(bufsize).put_long_long(offset, i).get_long_long(offset).should == i
111
124
  end
112
125
  end
113
126
  end
@@ -117,7 +130,7 @@ describe "Buffer#put_ulong_long" do
117
130
  [ 0, 1, 128, 32767, 65535, 0xdeadcafebabe, 0x7fffffffffffffff ].each do |i|
118
131
  (0..bufsize-8).each do |offset|
119
132
  it "put_ulong_long(#{offset}, #{i}).get_ulong_long(#{offset}) == #{i}" do
120
- Buffer.alloc_in(bufsize).put_ulong_long(offset, i).get_ulong_long(offset).should == i
133
+ FFI::Buffer.alloc_in(bufsize).put_ulong_long(offset, i).get_ulong_long(offset).should == i
121
134
  end
122
135
  end
123
136
  end
@@ -185,9 +198,9 @@ describe "Reading/Writing ascii strings" do
185
198
  end
186
199
  describe "Buffer#put_pointer" do
187
200
  it "put_pointer(0, p).get_pointer(0) == p" do
188
- p = MemoryPointer.new :ulong_long
201
+ p = FFI::MemoryPointer.new :ulong_long
189
202
  p.put_uint(0, 0xdeadbeef)
190
- buf = Buffer.alloc_inout 8
203
+ buf = FFI::Buffer.alloc_inout 8
191
204
  p2 = buf.put_pointer(0, p).get_pointer(0)
192
205
  p2.should_not be_nil
193
206
  p2.should == p
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe "Callback" do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe "functions with custom parameter types" do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe "functions with custom types" do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  module TestEnum0
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
  describe "FFI.errno" do
3
19
  module LibTest
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe "FFI" do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
  describe "Library" do
3
19
 
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
  require 'java' if RUBY_PLATFORM =~ /java/
3
19
 
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
  describe "Function with primitive integer arguments" do
3
19
  module LibTest
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe "functions returning :strptr" do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe FFI::Struct, ' with inline callback functions' do
@@ -13,6 +13,7 @@
13
13
  # You should have received a copy of the GNU Lesser General Public License
14
14
  # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
15
  #
16
+
16
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
17
18
 
18
19
  describe FFI::Struct, ' with an initialize function' do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  describe FFI::Struct do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
  describe "Struct tests" do
3
19
  StructTypes = {
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
  describe "Custom type definitions" do
3
19
  it "attach_function with custom typedef" do
@@ -1,3 +1,19 @@
1
+ #
2
+ # This file is part of ruby-ffi.
3
+ #
4
+ # This code is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Lesser General Public License version 3 only, as
6
+ # published by the Free Software Foundation.
7
+ #
8
+ # This code is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
+ # version 3 for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
15
+ #
16
+
1
17
  require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
18
 
3
19
  module LibTest