ffi 0.1.1 → 0.2.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.

Files changed (62) hide show
  1. data/Rakefile +52 -29
  2. data/ext/AbstractMemory.c +72 -28
  3. data/ext/AutoPointer.c +54 -0
  4. data/ext/AutoPointer.h +18 -0
  5. data/ext/Buffer.c +21 -17
  6. data/ext/Callback.c +81 -43
  7. data/ext/Callback.h +1 -1
  8. data/ext/Invoker.c +465 -108
  9. data/ext/MemoryPointer.c +25 -90
  10. data/ext/NativeLibrary.c +90 -0
  11. data/ext/NativeLibrary.h +22 -0
  12. data/ext/Platform.c +21 -2
  13. data/ext/Pointer.c +107 -0
  14. data/ext/Pointer.h +21 -0
  15. data/ext/Types.c +16 -5
  16. data/ext/Types.h +3 -1
  17. data/ext/compat.h +14 -0
  18. data/ext/extconf.rb +13 -1
  19. data/ext/ffi.c +11 -1
  20. data/ext/ffi.mk +3 -3
  21. data/ext/libffi.darwin.mk +19 -8
  22. data/gen/Rakefile +12 -0
  23. data/lib/ffi/autopointer.rb +61 -0
  24. data/lib/ffi/errno.rb +8 -0
  25. data/lib/ffi/ffi.rb +38 -201
  26. data/lib/ffi/io.rb +7 -0
  27. data/lib/ffi/library.rb +116 -0
  28. data/lib/ffi/managedstruct.rb +55 -0
  29. data/lib/ffi/memorypointer.rb +3 -96
  30. data/lib/ffi/platform.rb +8 -5
  31. data/lib/ffi/pointer.rb +105 -0
  32. data/lib/ffi/struct.rb +97 -42
  33. data/lib/ffi/tools/const_generator.rb +177 -0
  34. data/lib/ffi/tools/generator.rb +58 -0
  35. data/lib/ffi/tools/generator_task.rb +35 -0
  36. data/lib/ffi/tools/struct_generator.rb +194 -0
  37. data/lib/ffi/tools/types_generator.rb +123 -0
  38. data/lib/ffi/types.rb +150 -0
  39. data/lib/ffi/variadic.rb +30 -0
  40. data/nbproject/Makefile-Default.mk +6 -3
  41. data/nbproject/Makefile-impl.mk +5 -5
  42. data/nbproject/Package-Default.bash +72 -0
  43. data/nbproject/configurations.xml +139 -25
  44. data/nbproject/private/configurations.xml +1 -1
  45. data/nbproject/project.xml +4 -0
  46. data/samples/gettimeofday.rb +6 -2
  47. data/samples/inotify.rb +59 -0
  48. data/samples/pty.rb +75 -0
  49. data/specs/buffer_spec.rb +64 -9
  50. data/specs/callback_spec.rb +308 -4
  51. data/specs/errno_spec.rb +13 -0
  52. data/specs/library_spec.rb +55 -0
  53. data/specs/managed_struct_spec.rb +40 -0
  54. data/specs/number_spec.rb +183 -0
  55. data/specs/pointer_spec.rb +126 -0
  56. data/specs/rbx/memory_pointer_spec.rb +7 -7
  57. data/specs/spec_helper.rb +7 -0
  58. data/specs/string_spec.rb +34 -0
  59. data/specs/struct_spec.rb +223 -0
  60. data/specs/typedef_spec.rb +48 -0
  61. data/specs/variadic_spec.rb +84 -0
  62. metadata +270 -237
@@ -0,0 +1,48 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
+ describe "Custom type definitions" do
3
+ it "attach_function with custom typedef" do
4
+ module CustomTypedef
5
+ extend FFI::Library
6
+ ffi_lib TestLibrary::PATH
7
+ typedef :uint, :fubar_t
8
+ attach_function :ret_u_int32_t, [ :fubar_t ], :fubar_t
9
+ end
10
+ CustomTypedef.ret_u_int32_t(0x12345678).should == 0x12345678
11
+ end
12
+ it "variadic invoker with custom typedef" do
13
+ module VariadicCustomTypedef
14
+ extend FFI::Library
15
+ ffi_lib TestLibrary::PATH
16
+ typedef :uint, :fubar_t
17
+ attach_function :pack_varargs, [ :buffer_out, :string, :varargs ], :void
18
+ end
19
+ buf = FFI::Buffer.new :uint, 10
20
+ VariadicCustomTypedef.pack_varargs(buf, "i", :fubar_t, 0x12345678)
21
+ buf.get_uint(0).should == 0x12345678
22
+ end
23
+ it "Callback with custom typedef parameter" do
24
+ module CallbackCustomTypedef
25
+ extend FFI::Library
26
+ ffi_lib TestLibrary::PATH
27
+ typedef :uint, :fubar3_t
28
+ callback :cbIrV, [ :fubar3_t ], :void
29
+ attach_function :testCallbackU32rV, :testClosureIrV, [ :cbIrV, :fubar3_t ], :void
30
+ end
31
+ i = 0
32
+ CallbackCustomTypedef.testCallbackU32rV(0xdeadbeef) { |v| i = v }
33
+ i.should == 0xdeadbeef
34
+ end
35
+ module StructCustomTypedef
36
+ extend FFI::Library
37
+ ffi_lib TestLibrary::PATH
38
+ typedef :uint, :fubar3_t
39
+ class S < FFI::Struct
40
+ layout :a, :fubar3_t
41
+ end
42
+ end
43
+ it "Struct with custom typedef field" do
44
+ s = StructCustomTypedef::S.new
45
+ s[:a] = 0x12345678
46
+ s.pointer.get_uint(0).should == 0x12345678
47
+ end
48
+ end
@@ -0,0 +1,84 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
+ describe "Function with variadic arguments" do
3
+ module LibTest
4
+ extend FFI::Library
5
+ ffi_lib TestLibrary::PATH
6
+ attach_function :pack_varargs, [ :buffer_out, :string, :varargs ], :void
7
+ end
8
+ [ 0, 127, -128, -1 ].each do |i|
9
+ it "call variadic with (:char (#{i})) argument" do
10
+ buf = FFI::Buffer.new :long_long
11
+ LibTest.pack_varargs(buf, "c", :char, i)
12
+ buf.get_int64(0).should == i
13
+ end
14
+ end
15
+ [ 0, 0x7f, 0x80, 0xff ].each do |i|
16
+ it "call variadic with (:uchar (#{i})) argument" do
17
+ buf = FFI::Buffer.new :long_long
18
+ LibTest.pack_varargs(buf, "C", :uchar, i)
19
+ buf.get_int64(0).should == i
20
+ end
21
+ end
22
+ [ 0, 1.234567, 9.87654321 ].each do |v|
23
+ it "call variadic with (:float (#{v})) argument" do
24
+ buf = FFI::Buffer.new :long_long
25
+ LibTest.pack_varargs(buf, "f", :float, v.to_f)
26
+ buf.get_float64(0).should == v
27
+ end
28
+ end
29
+ [ 0, 1.234567, 9.87654321 ].each do |v|
30
+ it "call variadic with (:double (#{v})) argument" do
31
+ buf = FFI::Buffer.new :long_long
32
+ LibTest.pack_varargs(buf, "f", :double, v.to_f)
33
+ buf.get_float64(0).should == v
34
+ end
35
+ end
36
+ module Varargs
37
+ PACK_VALUES = {
38
+ 'c' => [ 0x12 ],
39
+ 'C' => [ 0x34 ],
40
+ 's' => [ 0x5678 ],
41
+ 'S' => [ 0x9abc ],
42
+ 'i' => [ 0x7654321f ],
43
+ 'I' => [ 0xfee1babe ],
44
+ 'l' => [ 0x1f2e3d4c ],
45
+ 'L' => [ 0xf7e8d9ca ],
46
+ 'j' => [ 0x1eafdeadbeefa1b2 ],
47
+ 'f' => [ 1.23456789 ],
48
+ 'd' => [ 9.87654321 ]
49
+ }
50
+ TYPE_MAP = {
51
+ 'c' => :char, 'C' => :uchar, 's' => :short, 'S' => :ushort,
52
+ 'i' => :int, 'I' => :uint, 'j' => :long_long, 'J' => :ulong_long,
53
+ 'l' => :long, 'L' => :ulong, 'f' => :float, 'd' => :double
54
+ }
55
+ def self.verify(p, off, v)
56
+ if v.kind_of?(Float)
57
+ p.get_float64(off).should == v
58
+ else
59
+ p.get_int64(off).should == v
60
+ end
61
+ end
62
+ end
63
+ Varargs::PACK_VALUES.keys.each do |t1|
64
+ Varargs::PACK_VALUES.keys.each do |t2|
65
+ Varargs::PACK_VALUES.keys.each do |t3|
66
+ Varargs::PACK_VALUES[t1].each do |v1|
67
+ Varargs::PACK_VALUES[t2].each do |v2|
68
+ Varargs::PACK_VALUES[t3].each do |v3|
69
+ fmt = "#{t1}#{t2}#{t3}"
70
+ params = [ Varargs::TYPE_MAP[t1], v1, Varargs::TYPE_MAP[t2], v2, Varargs::TYPE_MAP[t3], v3 ]
71
+ it "call(#{fmt}, #{params.join(',')})" do
72
+ buf = FFI::Buffer.new :long_long, 3
73
+ LibTest.pack_varargs(buf, fmt, *params)
74
+ Varargs.verify(buf, 0, v1)
75
+ Varargs.verify(buf, 8, v2)
76
+ Varargs.verify(buf, 16, v3)
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Meissner
@@ -9,7 +9,7 @@ autorequire: ffi
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-30 00:00:00 +10:00
12
+ date: 2008-12-03 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -19,6 +19,7 @@ executables: []
19
19
 
20
20
  extensions:
21
21
  - ext/extconf.rb
22
+ - gen/Rakefile
22
23
  extra_rdoc_files:
23
24
  - README
24
25
  - LICENSE
@@ -26,310 +27,342 @@ files:
26
27
  - LICENSE
27
28
  - README
28
29
  - Rakefile
30
+ - ext/rbffi.h
29
31
  - ext/AbstractMemory.c
30
- - ext/AbstractMemory.h
31
32
  - ext/Buffer.c
32
- - ext/Callback.c
33
- - ext/Callback.h
34
- - ext/compat.h
35
- - ext/extconf.rb
36
- - ext/ffi.c
37
- - ext/ffi.mk
38
- - ext/Invoker.c
33
+ - ext/Platform.h
34
+ - ext/Types.c
35
+ - ext/Pointer.c
36
+ - ext/libffi.mk
37
+ - ext/Types.h
39
38
  - ext/libffi
40
- - ext/libffi/acinclude.m4
41
- - ext/libffi/aclocal.m4
42
- - ext/libffi/ChangeLog
43
- - ext/libffi/ChangeLog.libffi
44
- - ext/libffi/ChangeLog.libgcj
45
- - ext/libffi/ChangeLog.v1
46
- - ext/libffi/compile
47
- - ext/libffi/config.guess
48
- - ext/libffi/config.sub
49
- - ext/libffi/configure
50
- - ext/libffi/configure.ac
39
+ - ext/libffi/LICENSE
40
+ - ext/libffi/Makefile.in
41
+ - ext/libffi/mkinstalldirs
42
+ - ext/libffi/ltcf-c.sh
43
+ - ext/libffi/ltcf-cxx.sh
51
44
  - ext/libffi/configure.host
52
- - ext/libffi/depcomp
45
+ - ext/libffi/libffi.pc.in
53
46
  - ext/libffi/doc
47
+ - ext/libffi/doc/version.texi
54
48
  - ext/libffi/doc/libffi.info
55
49
  - ext/libffi/doc/libffi.texi
56
50
  - ext/libffi/doc/stamp-vti
57
- - ext/libffi/doc/version.texi
58
- - ext/libffi/fficonfig.h.in
51
+ - ext/libffi/ChangeLog.v1
52
+ - ext/libffi/ChangeLog.libffi
53
+ - ext/libffi/install-sh
54
+ - ext/libffi/compile
55
+ - ext/libffi/config.guess
56
+ - ext/libffi/ChangeLog.libgcj
57
+ - ext/libffi/Makefile.am
58
+ - ext/libffi/aclocal.m4
59
59
  - ext/libffi/include
60
+ - ext/libffi/include/Makefile.in
61
+ - ext/libffi/include/Makefile.am
60
62
  - ext/libffi/include/ffi.h.in
61
63
  - ext/libffi/include/ffi_common.h
62
- - ext/libffi/include/Makefile.am
63
- - ext/libffi/include/Makefile.in
64
- - ext/libffi/install-sh
65
- - ext/libffi/libffi.pc.in
66
- - ext/libffi/libtool-version
67
- - ext/libffi/LICENSE
68
- - ext/libffi/ltcf-c.sh
69
- - ext/libffi/ltcf-cxx.sh
70
- - ext/libffi/ltcf-gcj.sh
71
- - ext/libffi/ltconfig
72
- - ext/libffi/ltmain.sh
73
- - ext/libffi/Makefile.am
74
- - ext/libffi/Makefile.in
75
- - ext/libffi/man
76
- - ext/libffi/man/ffi.3
77
- - ext/libffi/man/ffi_call.3
78
- - ext/libffi/man/ffi_prep_cif.3
79
- - ext/libffi/man/Makefile.am
80
- - ext/libffi/man/Makefile.in
81
- - ext/libffi/mdate-sh
64
+ - ext/libffi/ChangeLog
65
+ - ext/libffi/texinfo.tex
66
+ - ext/libffi/fficonfig.h.in
82
67
  - ext/libffi/missing
83
- - ext/libffi/mkinstalldirs
84
- - ext/libffi/README
68
+ - ext/libffi/configure
69
+ - ext/libffi/acinclude.m4
70
+ - ext/libffi/TODO
71
+ - ext/libffi/libtool-version
85
72
  - ext/libffi/src
86
- - ext/libffi/src/alpha
87
- - ext/libffi/src/alpha/ffi.c
88
- - ext/libffi/src/alpha/ffitarget.h
89
- - ext/libffi/src/alpha/osf.S
90
- - ext/libffi/src/arm
91
- - ext/libffi/src/arm/ffi.c
92
- - ext/libffi/src/arm/ffitarget.h
93
- - ext/libffi/src/arm/sysv.S
94
- - ext/libffi/src/closures.c
95
- - ext/libffi/src/cris
96
- - ext/libffi/src/cris/ffi.c
97
- - ext/libffi/src/cris/ffitarget.h
98
- - ext/libffi/src/cris/sysv.S
99
- - ext/libffi/src/debug.c
100
- - ext/libffi/src/dlmalloc.c
101
- - ext/libffi/src/frv
102
- - ext/libffi/src/frv/eabi.S
103
- - ext/libffi/src/frv/ffi.c
104
- - ext/libffi/src/frv/ffitarget.h
105
- - ext/libffi/src/ia64
106
- - ext/libffi/src/ia64/ffi.c
107
- - ext/libffi/src/ia64/ffitarget.h
108
- - ext/libffi/src/ia64/ia64_flags.h
109
- - ext/libffi/src/ia64/unix.S
110
- - ext/libffi/src/java_raw_api.c
111
- - ext/libffi/src/m32r
112
- - ext/libffi/src/m32r/ffi.c
113
- - ext/libffi/src/m32r/ffitarget.h
114
- - ext/libffi/src/m32r/sysv.S
115
- - ext/libffi/src/m68k
116
- - ext/libffi/src/m68k/ffi.c
117
- - ext/libffi/src/m68k/ffitarget.h
118
- - ext/libffi/src/m68k/sysv.S
119
- - ext/libffi/src/mips
120
- - ext/libffi/src/mips/ffi.c
121
- - ext/libffi/src/mips/ffitarget.h
122
- - ext/libffi/src/mips/n32.S
123
- - ext/libffi/src/mips/o32.S
124
73
  - ext/libffi/src/pa
74
+ - ext/libffi/src/pa/linux.S
125
75
  - ext/libffi/src/pa/ffi.c
126
- - ext/libffi/src/pa/ffitarget.h
127
76
  - ext/libffi/src/pa/hpux32.S
128
- - ext/libffi/src/pa/linux.S
77
+ - ext/libffi/src/pa/ffitarget.h
78
+ - ext/libffi/src/raw_api.c
79
+ - ext/libffi/src/java_raw_api.c
80
+ - ext/libffi/src/types.c
81
+ - ext/libffi/src/sparc
82
+ - ext/libffi/src/sparc/v9.S
83
+ - ext/libffi/src/sparc/ffi.c
84
+ - ext/libffi/src/sparc/v8.S
85
+ - ext/libffi/src/sparc/ffitarget.h
129
86
  - ext/libffi/src/powerpc
130
- - ext/libffi/src/powerpc/aix.S
131
- - ext/libffi/src/powerpc/aix_closure.S
132
87
  - ext/libffi/src/powerpc/asm.h
88
+ - ext/libffi/src/powerpc/ppc_closure.S
133
89
  - ext/libffi/src/powerpc/darwin.S
134
- - ext/libffi/src/powerpc/darwin_closure.S
135
- - ext/libffi/src/powerpc/ffi.c
136
- - ext/libffi/src/powerpc/ffi_darwin.c
137
- - ext/libffi/src/powerpc/ffitarget.h
138
90
  - ext/libffi/src/powerpc/linux64.S
139
- - ext/libffi/src/powerpc/linux64_closure.S
140
- - ext/libffi/src/powerpc/ppc_closure.S
91
+ - ext/libffi/src/powerpc/aix.S
141
92
  - ext/libffi/src/powerpc/sysv.S
142
- - ext/libffi/src/prep_cif.c
143
- - ext/libffi/src/raw_api.c
144
- - ext/libffi/src/s390
145
- - ext/libffi/src/s390/ffi.c
146
- - ext/libffi/src/s390/ffitarget.h
147
- - ext/libffi/src/s390/sysv.S
93
+ - ext/libffi/src/powerpc/aix_closure.S
94
+ - ext/libffi/src/powerpc/ffi.c
95
+ - ext/libffi/src/powerpc/linux64_closure.S
96
+ - ext/libffi/src/powerpc/ffitarget.h
97
+ - ext/libffi/src/powerpc/ffi_darwin.c
98
+ - ext/libffi/src/powerpc/darwin_closure.S
99
+ - ext/libffi/src/ia64
100
+ - ext/libffi/src/ia64/ia64_flags.h
101
+ - ext/libffi/src/ia64/unix.S
102
+ - ext/libffi/src/ia64/ffi.c
103
+ - ext/libffi/src/ia64/ffitarget.h
104
+ - ext/libffi/src/closures.c
105
+ - ext/libffi/src/debug.c
106
+ - ext/libffi/src/x86
107
+ - ext/libffi/src/x86/freebsd.S
108
+ - ext/libffi/src/x86/unix64.S
109
+ - ext/libffi/src/x86/darwin.S
110
+ - ext/libffi/src/x86/sysv.S
111
+ - ext/libffi/src/x86/ffi.c
112
+ - ext/libffi/src/x86/darwin64.S
113
+ - ext/libffi/src/x86/win32.S
114
+ - ext/libffi/src/x86/ffitarget.h
115
+ - ext/libffi/src/x86/ffi64.c
148
116
  - ext/libffi/src/sh
117
+ - ext/libffi/src/sh/sysv.S
149
118
  - ext/libffi/src/sh/ffi.c
150
119
  - ext/libffi/src/sh/ffitarget.h
151
- - ext/libffi/src/sh/sysv.S
152
120
  - ext/libffi/src/sh64
121
+ - ext/libffi/src/sh64/sysv.S
153
122
  - ext/libffi/src/sh64/ffi.c
154
123
  - ext/libffi/src/sh64/ffitarget.h
155
- - ext/libffi/src/sh64/sysv.S
156
- - ext/libffi/src/sparc
157
- - ext/libffi/src/sparc/ffi.c
158
- - ext/libffi/src/sparc/ffitarget.h
159
- - ext/libffi/src/sparc/v8.S
160
- - ext/libffi/src/sparc/v9.S
161
- - ext/libffi/src/types.c
162
- - ext/libffi/src/x86
163
- - ext/libffi/src/x86/darwin.S
164
- - ext/libffi/src/x86/darwin64.S
165
- - ext/libffi/src/x86/ffi.c
166
- - ext/libffi/src/x86/ffi64.c
167
- - ext/libffi/src/x86/ffitarget.h
168
- - ext/libffi/src/x86/freebsd.S
169
- - ext/libffi/src/x86/sysv.S
170
- - ext/libffi/src/x86/unix64.S
171
- - ext/libffi/src/x86/win32.S
124
+ - ext/libffi/src/frv
125
+ - ext/libffi/src/frv/eabi.S
126
+ - ext/libffi/src/frv/ffi.c
127
+ - ext/libffi/src/frv/ffitarget.h
128
+ - ext/libffi/src/arm
129
+ - ext/libffi/src/arm/sysv.S
130
+ - ext/libffi/src/arm/ffi.c
131
+ - ext/libffi/src/arm/ffitarget.h
132
+ - ext/libffi/src/m32r
133
+ - ext/libffi/src/m32r/sysv.S
134
+ - ext/libffi/src/m32r/ffi.c
135
+ - ext/libffi/src/m32r/ffitarget.h
136
+ - ext/libffi/src/cris
137
+ - ext/libffi/src/cris/sysv.S
138
+ - ext/libffi/src/cris/ffi.c
139
+ - ext/libffi/src/cris/ffitarget.h
140
+ - ext/libffi/src/s390
141
+ - ext/libffi/src/s390/sysv.S
142
+ - ext/libffi/src/s390/ffi.c
143
+ - ext/libffi/src/s390/ffitarget.h
144
+ - ext/libffi/src/alpha
145
+ - ext/libffi/src/alpha/osf.S
146
+ - ext/libffi/src/alpha/ffi.c
147
+ - ext/libffi/src/alpha/ffitarget.h
148
+ - ext/libffi/src/mips
149
+ - ext/libffi/src/mips/ffi.c
150
+ - ext/libffi/src/mips/o32.S
151
+ - ext/libffi/src/mips/n32.S
152
+ - ext/libffi/src/mips/ffitarget.h
153
+ - ext/libffi/src/dlmalloc.c
154
+ - ext/libffi/src/m68k
155
+ - ext/libffi/src/m68k/sysv.S
156
+ - ext/libffi/src/m68k/ffi.c
157
+ - ext/libffi/src/m68k/ffitarget.h
158
+ - ext/libffi/src/prep_cif.c
159
+ - ext/libffi/man
160
+ - ext/libffi/man/Makefile.in
161
+ - ext/libffi/man/ffi_prep_cif.3
162
+ - ext/libffi/man/ffi.3
163
+ - ext/libffi/man/Makefile.am
164
+ - ext/libffi/man/ffi_call.3
165
+ - ext/libffi/ltconfig
166
+ - ext/libffi/ltcf-gcj.sh
172
167
  - ext/libffi/testsuite
173
- - ext/libffi/testsuite/config
174
- - ext/libffi/testsuite/config/default.exp
168
+ - ext/libffi/testsuite/Makefile.in
175
169
  - ext/libffi/testsuite/lib
176
170
  - ext/libffi/testsuite/lib/libffi-dg.exp
177
- - ext/libffi/testsuite/lib/target-libpath.exp
178
171
  - ext/libffi/testsuite/lib/wrapper.exp
172
+ - ext/libffi/testsuite/lib/target-libpath.exp
173
+ - ext/libffi/testsuite/config
174
+ - ext/libffi/testsuite/config/default.exp
175
+ - ext/libffi/testsuite/Makefile.am
176
+ - ext/libffi/testsuite/libffi.special
177
+ - ext/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
178
+ - ext/libffi/testsuite/libffi.special/unwindtest.cc
179
+ - ext/libffi/testsuite/libffi.special/special.exp
180
+ - ext/libffi/testsuite/libffi.special/ffitestcxx.h
179
181
  - ext/libffi/testsuite/libffi.call
180
- - ext/libffi/testsuite/libffi.call/call.exp
181
- - ext/libffi/testsuite/libffi.call/closure_fn0.c
182
- - ext/libffi/testsuite/libffi.call/closure_fn1.c
183
- - ext/libffi/testsuite/libffi.call/closure_fn2.c
184
- - ext/libffi/testsuite/libffi.call/closure_fn3.c
185
- - ext/libffi/testsuite/libffi.call/closure_fn4.c
186
- - ext/libffi/testsuite/libffi.call/closure_fn5.c
187
- - ext/libffi/testsuite/libffi.call/closure_fn6.c
188
- - ext/libffi/testsuite/libffi.call/closure_stdcall.c
182
+ - ext/libffi/testsuite/libffi.call/return_fl2.c
183
+ - ext/libffi/testsuite/libffi.call/struct9.c
184
+ - ext/libffi/testsuite/libffi.call/promotion.c
185
+ - ext/libffi/testsuite/libffi.call/cls_align_double.c
186
+ - ext/libffi/testsuite/libffi.call/return_dbl.c
187
+ - ext/libffi/testsuite/libffi.call/cls_ulonglong.c
188
+ - ext/libffi/testsuite/libffi.call/many_win32.c
189
+ - ext/libffi/testsuite/libffi.call/nested_struct1.c
189
190
  - ext/libffi/testsuite/libffi.call/cls_12byte.c
190
- - ext/libffi/testsuite/libffi.call/cls_16byte.c
191
- - ext/libffi/testsuite/libffi.call/cls_18byte.c
192
- - ext/libffi/testsuite/libffi.call/cls_19byte.c
193
- - ext/libffi/testsuite/libffi.call/cls_1_1byte.c
194
- - ext/libffi/testsuite/libffi.call/cls_20byte.c
195
- - ext/libffi/testsuite/libffi.call/cls_20byte1.c
191
+ - ext/libffi/testsuite/libffi.call/nested_struct10.c
196
192
  - ext/libffi/testsuite/libffi.call/cls_24byte.c
197
- - ext/libffi/testsuite/libffi.call/cls_2byte.c
193
+ - ext/libffi/testsuite/libffi.call/many.c
198
194
  - ext/libffi/testsuite/libffi.call/cls_3_1byte.c
199
- - ext/libffi/testsuite/libffi.call/cls_3byte1.c
195
+ - ext/libffi/testsuite/libffi.call/cls_6byte.c
196
+ - ext/libffi/testsuite/libffi.call/strlen_win32.c
197
+ - ext/libffi/testsuite/libffi.call/closure_fn0.c
198
+ - ext/libffi/testsuite/libffi.call/cls_20byte1.c
199
+ - ext/libffi/testsuite/libffi.call/cls_align_uint16.c
200
+ - ext/libffi/testsuite/libffi.call/nested_struct4.c
201
+ - ext/libffi/testsuite/libffi.call/return_sl.c
202
+ - ext/libffi/testsuite/libffi.call/return_ldl.c
203
+ - ext/libffi/testsuite/libffi.call/nested_struct8.c
200
204
  - ext/libffi/testsuite/libffi.call/cls_3byte2.c
201
- - ext/libffi/testsuite/libffi.call/cls_4_1byte.c
202
- - ext/libffi/testsuite/libffi.call/cls_4byte.c
203
- - ext/libffi/testsuite/libffi.call/cls_5_1_byte.c
204
- - ext/libffi/testsuite/libffi.call/cls_5byte.c
205
205
  - ext/libffi/testsuite/libffi.call/cls_64byte.c
206
- - ext/libffi/testsuite/libffi.call/cls_6_1_byte.c
207
- - ext/libffi/testsuite/libffi.call/cls_6byte.c
208
- - ext/libffi/testsuite/libffi.call/cls_7_1_byte.c
206
+ - ext/libffi/testsuite/libffi.call/cls_5byte.c
207
+ - ext/libffi/testsuite/libffi.call/cls_double.c
208
+ - ext/libffi/testsuite/libffi.call/cls_4_1byte.c
209
+ - ext/libffi/testsuite/libffi.call/struct4.c
210
+ - ext/libffi/testsuite/libffi.call/cls_sint.c
209
211
  - ext/libffi/testsuite/libffi.call/cls_7byte.c
210
- - ext/libffi/testsuite/libffi.call/cls_8byte.c
211
- - ext/libffi/testsuite/libffi.call/cls_9byte1.c
212
212
  - ext/libffi/testsuite/libffi.call/cls_9byte2.c
213
- - ext/libffi/testsuite/libffi.call/cls_align_double.c
214
- - ext/libffi/testsuite/libffi.call/cls_align_float.c
215
- - ext/libffi/testsuite/libffi.call/cls_align_longdouble.c
216
- - ext/libffi/testsuite/libffi.call/cls_align_pointer.c
217
- - ext/libffi/testsuite/libffi.call/cls_align_sint16.c
218
- - ext/libffi/testsuite/libffi.call/cls_align_sint32.c
219
- - ext/libffi/testsuite/libffi.call/cls_align_sint64.c
220
- - ext/libffi/testsuite/libffi.call/cls_align_uint16.c
221
- - ext/libffi/testsuite/libffi.call/cls_align_uint32.c
222
- - ext/libffi/testsuite/libffi.call/cls_align_uint64.c
223
- - ext/libffi/testsuite/libffi.call/cls_double.c
224
- - ext/libffi/testsuite/libffi.call/cls_float.c
225
- - ext/libffi/testsuite/libffi.call/cls_multi_schar.c
213
+ - ext/libffi/testsuite/libffi.call/closure_fn1.c
214
+ - ext/libffi/testsuite/libffi.call/struct2.c
215
+ - ext/libffi/testsuite/libffi.call/struct5.c
216
+ - ext/libffi/testsuite/libffi.call/cls_multi_uchar.c
217
+ - ext/libffi/testsuite/libffi.call/cls_18byte.c
218
+ - ext/libffi/testsuite/libffi.call/return_dbl1.c
226
219
  - ext/libffi/testsuite/libffi.call/cls_multi_sshort.c
220
+ - ext/libffi/testsuite/libffi.call/return_sc.c
221
+ - ext/libffi/testsuite/libffi.call/call.exp
222
+ - ext/libffi/testsuite/libffi.call/strlen.c
223
+ - ext/libffi/testsuite/libffi.call/closure_fn6.c
224
+ - ext/libffi/testsuite/libffi.call/float4.c
225
+ - ext/libffi/testsuite/libffi.call/cls_6_1_byte.c
226
+ - ext/libffi/testsuite/libffi.call/nested_struct3.c
227
+ - ext/libffi/testsuite/libffi.call/pyobjc-tc.c
228
+ - ext/libffi/testsuite/libffi.call/nested_struct9.c
227
229
  - ext/libffi/testsuite/libffi.call/cls_multi_sshortchar.c
228
- - ext/libffi/testsuite/libffi.call/cls_multi_uchar.c
229
- - ext/libffi/testsuite/libffi.call/cls_multi_ushort.c
230
- - ext/libffi/testsuite/libffi.call/cls_multi_ushortchar.c
231
- - ext/libffi/testsuite/libffi.call/cls_schar.c
232
- - ext/libffi/testsuite/libffi.call/cls_sint.c
233
- - ext/libffi/testsuite/libffi.call/cls_sshort.c
234
- - ext/libffi/testsuite/libffi.call/cls_uchar.c
235
- - ext/libffi/testsuite/libffi.call/cls_uint.c
236
- - ext/libffi/testsuite/libffi.call/cls_ulonglong.c
237
- - ext/libffi/testsuite/libffi.call/cls_ushort.c
238
230
  - ext/libffi/testsuite/libffi.call/ffitest.h
239
- - ext/libffi/testsuite/libffi.call/float.c
240
- - ext/libffi/testsuite/libffi.call/float1.c
241
- - ext/libffi/testsuite/libffi.call/float2.c
231
+ - ext/libffi/testsuite/libffi.call/cls_16byte.c
232
+ - ext/libffi/testsuite/libffi.call/cls_4byte.c
233
+ - ext/libffi/testsuite/libffi.call/cls_align_longdouble.c
234
+ - ext/libffi/testsuite/libffi.call/struct1.c
235
+ - ext/libffi/testsuite/libffi.call/cls_align_sint16.c
236
+ - ext/libffi/testsuite/libffi.call/closure_fn3.c
237
+ - ext/libffi/testsuite/libffi.call/struct3.c
238
+ - ext/libffi/testsuite/libffi.call/cls_19byte.c
239
+ - ext/libffi/testsuite/libffi.call/closure_stdcall.c
240
+ - ext/libffi/testsuite/libffi.call/cls_8byte.c
242
241
  - ext/libffi/testsuite/libffi.call/float3.c
243
- - ext/libffi/testsuite/libffi.call/float4.c
244
- - ext/libffi/testsuite/libffi.call/many.c
245
- - ext/libffi/testsuite/libffi.call/many_win32.c
242
+ - ext/libffi/testsuite/libffi.call/return_ll.c
243
+ - ext/libffi/testsuite/libffi.call/cls_float.c
244
+ - ext/libffi/testsuite/libffi.call/float1.c
245
+ - ext/libffi/testsuite/libffi.call/return_dbl2.c
246
246
  - ext/libffi/testsuite/libffi.call/negint.c
247
- - ext/libffi/testsuite/libffi.call/nested_struct.c
248
- - ext/libffi/testsuite/libffi.call/nested_struct1.c
249
- - ext/libffi/testsuite/libffi.call/nested_struct10.c
250
- - ext/libffi/testsuite/libffi.call/nested_struct2.c
251
- - ext/libffi/testsuite/libffi.call/nested_struct3.c
252
- - ext/libffi/testsuite/libffi.call/nested_struct4.c
253
- - ext/libffi/testsuite/libffi.call/nested_struct5.c
254
- - ext/libffi/testsuite/libffi.call/nested_struct6.c
255
- - ext/libffi/testsuite/libffi.call/nested_struct7.c
256
- - ext/libffi/testsuite/libffi.call/nested_struct8.c
257
- - ext/libffi/testsuite/libffi.call/nested_struct9.c
258
247
  - ext/libffi/testsuite/libffi.call/problem1.c
259
- - ext/libffi/testsuite/libffi.call/promotion.c
260
- - ext/libffi/testsuite/libffi.call/pyobjc-tc.c
261
- - ext/libffi/testsuite/libffi.call/return_dbl.c
262
- - ext/libffi/testsuite/libffi.call/return_dbl1.c
263
- - ext/libffi/testsuite/libffi.call/return_dbl2.c
264
- - ext/libffi/testsuite/libffi.call/return_fl.c
265
248
  - ext/libffi/testsuite/libffi.call/return_fl1.c
266
- - ext/libffi/testsuite/libffi.call/return_fl2.c
267
- - ext/libffi/testsuite/libffi.call/return_fl3.c
268
- - ext/libffi/testsuite/libffi.call/return_ldl.c
269
- - ext/libffi/testsuite/libffi.call/return_ll.c
270
- - ext/libffi/testsuite/libffi.call/return_ll1.c
271
- - ext/libffi/testsuite/libffi.call/return_sc.c
272
- - ext/libffi/testsuite/libffi.call/return_sl.c
249
+ - ext/libffi/testsuite/libffi.call/cls_uchar.c
250
+ - ext/libffi/testsuite/libffi.call/cls_ushort.c
251
+ - ext/libffi/testsuite/libffi.call/nested_struct5.c
252
+ - ext/libffi/testsuite/libffi.call/cls_align_uint64.c
253
+ - ext/libffi/testsuite/libffi.call/struct7.c
273
254
  - ext/libffi/testsuite/libffi.call/return_uc.c
255
+ - ext/libffi/testsuite/libffi.call/cls_1_1byte.c
256
+ - ext/libffi/testsuite/libffi.call/closure_fn5.c
257
+ - ext/libffi/testsuite/libffi.call/cls_align_sint32.c
258
+ - ext/libffi/testsuite/libffi.call/cls_2byte.c
259
+ - ext/libffi/testsuite/libffi.call/cls_align_float.c
274
260
  - ext/libffi/testsuite/libffi.call/return_ul.c
275
- - ext/libffi/testsuite/libffi.call/strlen.c
276
- - ext/libffi/testsuite/libffi.call/strlen_win32.c
277
- - ext/libffi/testsuite/libffi.call/struct1.c
278
- - ext/libffi/testsuite/libffi.call/struct2.c
279
- - ext/libffi/testsuite/libffi.call/struct3.c
280
- - ext/libffi/testsuite/libffi.call/struct4.c
281
- - ext/libffi/testsuite/libffi.call/struct5.c
261
+ - ext/libffi/testsuite/libffi.call/nested_struct7.c
282
262
  - ext/libffi/testsuite/libffi.call/struct6.c
283
- - ext/libffi/testsuite/libffi.call/struct7.c
284
263
  - ext/libffi/testsuite/libffi.call/struct8.c
285
- - ext/libffi/testsuite/libffi.call/struct9.c
286
- - ext/libffi/testsuite/libffi.special
287
- - ext/libffi/testsuite/libffi.special/ffitestcxx.h
288
- - ext/libffi/testsuite/libffi.special/special.exp
289
- - ext/libffi/testsuite/libffi.special/unwindtest.cc
290
- - ext/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
291
- - ext/libffi/testsuite/Makefile.am
292
- - ext/libffi/testsuite/Makefile.in
293
- - ext/libffi/texinfo.tex
294
- - ext/libffi/TODO
264
+ - ext/libffi/testsuite/libffi.call/nested_struct.c
265
+ - ext/libffi/testsuite/libffi.call/nested_struct2.c
266
+ - ext/libffi/testsuite/libffi.call/return_fl.c
267
+ - ext/libffi/testsuite/libffi.call/closure_fn4.c
268
+ - ext/libffi/testsuite/libffi.call/cls_9byte1.c
269
+ - ext/libffi/testsuite/libffi.call/float.c
270
+ - ext/libffi/testsuite/libffi.call/return_fl3.c
271
+ - ext/libffi/testsuite/libffi.call/cls_multi_ushort.c
272
+ - ext/libffi/testsuite/libffi.call/cls_multi_schar.c
273
+ - ext/libffi/testsuite/libffi.call/float2.c
274
+ - ext/libffi/testsuite/libffi.call/closure_fn2.c
275
+ - ext/libffi/testsuite/libffi.call/cls_7_1_byte.c
276
+ - ext/libffi/testsuite/libffi.call/cls_3byte1.c
277
+ - ext/libffi/testsuite/libffi.call/cls_align_pointer.c
278
+ - ext/libffi/testsuite/libffi.call/cls_5_1_byte.c
279
+ - ext/libffi/testsuite/libffi.call/cls_sshort.c
280
+ - ext/libffi/testsuite/libffi.call/cls_multi_ushortchar.c
281
+ - ext/libffi/testsuite/libffi.call/cls_schar.c
282
+ - ext/libffi/testsuite/libffi.call/cls_20byte.c
283
+ - ext/libffi/testsuite/libffi.call/cls_uint.c
284
+ - ext/libffi/testsuite/libffi.call/return_ll1.c
285
+ - ext/libffi/testsuite/libffi.call/cls_align_sint64.c
286
+ - ext/libffi/testsuite/libffi.call/cls_align_uint32.c
287
+ - ext/libffi/testsuite/libffi.call/nested_struct6.c
288
+ - ext/libffi/ltmain.sh
289
+ - ext/libffi/mdate-sh
290
+ - ext/libffi/README
291
+ - ext/libffi/config.sub
292
+ - ext/libffi/depcomp
293
+ - ext/libffi/configure.ac
295
294
  - ext/libffi.darwin.mk
296
- - ext/libffi.mk
297
295
  - ext/MemoryPointer.c
296
+ - ext/ffi.c
297
+ - ext/Callback.c
298
+ - ext/NativeLibrary.h
299
+ - ext/compat.h
300
+ - ext/AutoPointer.c
301
+ - ext/Callback.h
298
302
  - ext/MemoryPointer.h
303
+ - ext/AbstractMemory.h
304
+ - ext/NativeLibrary.c
305
+ - ext/ffi.mk
306
+ - ext/Pointer.h
307
+ - ext/AutoPointer.h
299
308
  - ext/Platform.c
300
- - ext/Platform.h
301
- - ext/rbffi.h
302
- - ext/Types.c
303
- - ext/Types.h
309
+ - ext/extconf.rb
310
+ - ext/Invoker.c
304
311
  - lib/ffi
305
- - lib/ffi/buffer.rb
312
+ - lib/ffi/errno.rb
306
313
  - lib/ffi/callback.rb
307
- - lib/ffi/ffi.rb
308
- - lib/ffi/memorypointer.rb
314
+ - lib/ffi/pointer.rb
315
+ - lib/ffi/managedstruct.rb
309
316
  - lib/ffi/platform.rb
317
+ - lib/ffi/tools
318
+ - lib/ffi/tools/generator_task.rb
319
+ - lib/ffi/tools/generator.rb
320
+ - lib/ffi/tools/types_generator.rb
321
+ - lib/ffi/tools/struct_generator.rb
322
+ - lib/ffi/tools/const_generator.rb
323
+ - lib/ffi/autopointer.rb
324
+ - lib/ffi/library.rb
325
+ - lib/ffi/types.rb
310
326
  - lib/ffi/struct.rb
327
+ - lib/ffi/io.rb
328
+ - lib/ffi/memorypointer.rb
329
+ - lib/ffi/buffer.rb
330
+ - lib/ffi/ffi.rb
331
+ - lib/ffi/variadic.rb
311
332
  - lib/ffi.rb
312
- - nbproject/configurations.xml
313
- - nbproject/Makefile-Default.mk
314
333
  - nbproject/Makefile-impl.mk
315
334
  - nbproject/private
316
- - nbproject/private/configurations.xml
317
335
  - nbproject/private/private.xml
336
+ - nbproject/private/configurations.xml
318
337
  - nbproject/project.properties
338
+ - nbproject/Makefile-Default.mk
319
339
  - nbproject/project.xml
340
+ - nbproject/Package-Default.bash
341
+ - nbproject/configurations.xml
342
+ - samples/pty.rb
320
343
  - samples/getlogin.rb
344
+ - samples/qsort.rb
345
+ - samples/inotify.rb
346
+ - samples/hello.rb
321
347
  - samples/getpid.rb
322
348
  - samples/gettimeofday.rb
323
- - samples/hello.rb
324
- - samples/qsort.rb
325
- - specs/buffer_spec.rb
326
- - specs/callback_spec.rb
349
+ - specs/variadic_spec.rb
350
+ - specs/typedef_spec.rb
351
+ - specs/pointer_spec.rb
352
+ - specs/managed_struct_spec.rb
353
+ - specs/spec_helper.rb
354
+ - specs/library_spec.rb
355
+ - specs/number_spec.rb
356
+ - specs/errno_spec.rb
357
+ - specs/struct_spec.rb
327
358
  - specs/rbx
328
- - specs/rbx/attach_function_spec.rb
329
- - specs/rbx/memory_pointer_spec.rb
330
359
  - specs/rbx/spec_helper.rb
331
360
  - specs/rbx/struct_spec.rb
332
- - specs/spec_helper.rb
361
+ - specs/rbx/attach_function_spec.rb
362
+ - specs/rbx/memory_pointer_spec.rb
363
+ - specs/buffer_spec.rb
364
+ - specs/callback_spec.rb
365
+ - specs/string_spec.rb
333
366
  has_rdoc: true
334
367
  homepage: http://kenai.com/projects/ruby-ffi
335
368
  post_install_message:
@@ -352,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
385
  requirements: []
353
386
 
354
387
  rubyforge_project: ffi
355
- rubygems_version: 1.3.1
388
+ rubygems_version: 1.2.0
356
389
  signing_key:
357
390
  specification_version: 2
358
391
  summary: A Ruby foreign function interface (compatible with Rubinius and JRuby FFI)