ffi 0.6.1 → 0.6.2
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/History.txt +102 -0
- data/Rakefile +2 -2
- data/ext/ffi_c/libffi.gnu.mk +1 -1
- data/lib/ffi/struct.rb +2 -2
- data/lib/ffi_c.so +0 -0
- data/spec/ffi/struct_spec.rb +2 -2
- metadata +16 -2
data/History.txt
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
== 0.5.0 / 2009-10-06
|
2
|
+
|
3
|
+
* Major improvements
|
4
|
+
* New Function class
|
5
|
+
* Structs can be passed and returned by value
|
6
|
+
* Implement a custom trampoline for x86_64, resulting in roughly 30% speedup
|
7
|
+
* Improve dispatch of functions which take (0..6) char/short/int/long/pointer arguments by between 50% and 200% on x86_64
|
8
|
+
* Callbacks are now approximately 100% faster on x86_64
|
9
|
+
* Minor improvements
|
10
|
+
* Add support for MacOSX Snow Leopard
|
11
|
+
* Improve support for Windows releasing fat binaries on rubyforge
|
12
|
+
* Better introspection in structs:
|
13
|
+
* Add StructLayout::Field#type, size, offset, alignment and name
|
14
|
+
methods
|
15
|
+
* Add StructLayout#fields which returns an array of
|
16
|
+
StructLayout::Field objects
|
17
|
+
* Add automagic deducing of library name from module name.
|
18
|
+
Idea and prototype implementation from Matt Hulse
|
19
|
+
* Callback fields in structs can now be both read and written
|
20
|
+
* Add a bunch of new benchmarks
|
21
|
+
* Lots of refactoring
|
22
|
+
* Experimental features
|
23
|
+
* blocking functions (i.e. native code that blocks the thread) support
|
24
|
+
* Bug fixes
|
25
|
+
* Fix RUBY-FFI_43 (rake gem dependency)
|
26
|
+
|
27
|
+
== 0.4.0 / 2009-08-05
|
28
|
+
|
29
|
+
* Major improvements
|
30
|
+
* Add support for boolean types
|
31
|
+
* Add support for methods as callbacks
|
32
|
+
* Add FFI::IO.read as described in JRUBY-3636
|
33
|
+
* Minor improvements
|
34
|
+
* Add Pointer::NULL constant
|
35
|
+
* Add AbstractMemory#get_array_of_string()
|
36
|
+
* Implement Pointer.new(address) and Pointer.new(:type, address)
|
37
|
+
* Bug fixes
|
38
|
+
* Fix RUBY_FFI-38
|
39
|
+
* Fix issues related to 1.9.1 build
|
40
|
+
* Fix issues related to OSX build
|
41
|
+
* Fix issues related to FreeBSD build
|
42
|
+
* Fix issues related to OpenSolaris build
|
43
|
+
|
44
|
+
== 0.3.5 / 2009-05-08
|
45
|
+
|
46
|
+
* Bug fixes
|
47
|
+
* Fix RUBY_FFI-17
|
48
|
+
* Fix RUBY_FFI-21
|
49
|
+
|
50
|
+
== 0.3.4 / 2009-05-01
|
51
|
+
|
52
|
+
* Minor improvements
|
53
|
+
* Add return statements to functions that call rb_raise(), in case
|
54
|
+
rb_raise is not declared noreturn, to avoid gcc warnings.
|
55
|
+
|
56
|
+
== 0.3.3 / 2009-04-27
|
57
|
+
|
58
|
+
* Minor improvements
|
59
|
+
* Implement RUBY_FFI-16 - Add support for anonymous callbacks
|
60
|
+
* Add support for callback parameters in callbacks
|
61
|
+
* Add support for function pointer return values
|
62
|
+
* Callbacks can now coerce proc objects into function pointers for
|
63
|
+
return values.
|
64
|
+
* Implement FFI::Type and FFI::Type::Builtin
|
65
|
+
* Add support for enumerations
|
66
|
+
* Bug fixes
|
67
|
+
* Fix RUBY_FFI-19
|
68
|
+
* Fix RUBY_FFI-15
|
69
|
+
|
70
|
+
== 0.3.2 / 2009-05-01
|
71
|
+
|
72
|
+
* Bug fixes
|
73
|
+
* Fix JRUBY-3527 by passing RTLD_GLOBAL instead of RTLD_LOCAL
|
74
|
+
|
75
|
+
== 0.3.1 / 2009-03-23
|
76
|
+
|
77
|
+
* Bug fixes
|
78
|
+
* Correctly save errno/GetLastError after each call.
|
79
|
+
|
80
|
+
== 0.3.0 / 2009-03-19
|
81
|
+
|
82
|
+
* Switch compilation to rake-compiler
|
83
|
+
* Makes cross-compilation from linux -> win32 super easy
|
84
|
+
* win32 support is available now, but highly experimental
|
85
|
+
* Performance improvements
|
86
|
+
* struct field access approx 3x faster than 0.2.0
|
87
|
+
* function invocation approx 20% faster than 0.2.0
|
88
|
+
* A bunch of minor improvements
|
89
|
+
* Struct instances can now be passed as :pointer parameters without calling
|
90
|
+
Struct#pointer
|
91
|
+
* Support for array struct members
|
92
|
+
* Structs are now padded correctly to the alignment of the struct's
|
93
|
+
largest field
|
94
|
+
* Global library variables
|
95
|
+
* Callbacks in global library variables
|
96
|
+
* Strings passed in as :string arguments are scrubbed to avoid
|
97
|
+
poison-null-byte attacks.
|
98
|
+
* Union support
|
99
|
+
* nil can be passed as a :string argument (passed as NULL)
|
100
|
+
* Structs can now be fields inside another struct
|
101
|
+
* Lots of internal cleanups and refactorings.
|
102
|
+
|
data/Rakefile
CHANGED
@@ -75,7 +75,7 @@ PROJ.name = 'ffi'
|
|
75
75
|
PROJ.authors = 'Wayne Meissner'
|
76
76
|
PROJ.email = 'wmeissner@gmail.com'
|
77
77
|
PROJ.url = 'http://wiki.github.com/ffi/ffi'
|
78
|
-
PROJ.version = '0.6.
|
78
|
+
PROJ.version = '0.6.2'
|
79
79
|
PROJ.rubyforge.name = 'ffi'
|
80
80
|
PROJ.readme_file = 'README.rdoc'
|
81
81
|
|
@@ -88,7 +88,7 @@ PROJ.ann.email[:server] = 'smtp.gmail.com'
|
|
88
88
|
|
89
89
|
# Gem specifications
|
90
90
|
PROJ.gem.need_tar = false
|
91
|
-
PROJ.gem.files = %w(LICENSE README.rdoc Rakefile) + Dir.glob("{ext,gen,lib,spec,tasks}/**/*")
|
91
|
+
PROJ.gem.files = %w(History.txt LICENSE README.rdoc Rakefile) + Dir.glob("{ext,gen,lib,spec,tasks}/**/*")
|
92
92
|
PROJ.gem.platform = Gem::Platform::RUBY
|
93
93
|
|
94
94
|
# Override Mr. Bones autogenerated extensions and force ours in
|
data/ext/ffi_c/libffi.gnu.mk
CHANGED
@@ -14,7 +14,7 @@ LIBFFI_BUILD_DIR = $(BUILD_DIR)/libffi
|
|
14
14
|
ifeq ($(srcdir),.)
|
15
15
|
LIBFFI_SRC_DIR := $(shell pwd)/libffi
|
16
16
|
else
|
17
|
-
LIBFFI_SRC_DIR := $(srcdir)/libffi
|
17
|
+
LIBFFI_SRC_DIR := $(abspath $(srcdir)/libffi)
|
18
18
|
endif
|
19
19
|
|
20
20
|
LIBFFI = $(LIBFFI_BUILD_DIR)/.libs/libffi_convenience.a
|
data/lib/ffi/struct.rb
CHANGED
data/lib/ffi_c.so
ADDED
Binary file
|
data/spec/ffi/struct_spec.rb
CHANGED
@@ -290,14 +290,14 @@ describe "Struct tests" do
|
|
290
290
|
extend FFI::Library
|
291
291
|
enum :test_enum, [:c1, 10, :c2, 20, :c3, 30, :c4, 40]
|
292
292
|
class TestStruct < FFI::Struct
|
293
|
-
layout :c, :test_enum
|
293
|
+
layout :a, :int, :c, :test_enum
|
294
294
|
end
|
295
295
|
end
|
296
296
|
it ":enum field r/w" do
|
297
297
|
s = EnumFields::TestStruct.new
|
298
298
|
s[:c] = :c3
|
299
299
|
|
300
|
-
s.pointer.get_uint(
|
300
|
+
s.pointer.get_uint(FFI::Type::INT32.size).should == 30
|
301
301
|
s[:c].should == :c3
|
302
302
|
end
|
303
303
|
module CallbackMember
|
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.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-16 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,6 +22,16 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 0.8.7
|
24
24
|
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bones
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.2.1
|
34
|
+
version:
|
25
35
|
description: |-
|
26
36
|
Ruby-FFI is a ruby extension for programmatically loading dynamic
|
27
37
|
libraries, binding functions within them, and calling those functions
|
@@ -35,8 +45,11 @@ extensions:
|
|
35
45
|
- ext/ffi_c/extconf.rb
|
36
46
|
- gen/Rakefile
|
37
47
|
extra_rdoc_files:
|
48
|
+
- History.txt
|
38
49
|
- README.rdoc
|
50
|
+
- lib/ffi_c.so
|
39
51
|
files:
|
52
|
+
- History.txt
|
40
53
|
- LICENSE
|
41
54
|
- README.rdoc
|
42
55
|
- Rakefile
|
@@ -359,6 +372,7 @@ files:
|
|
359
372
|
- lib/ffi/types.rb
|
360
373
|
- lib/ffi/union.rb
|
361
374
|
- lib/ffi/variadic.rb
|
375
|
+
- lib/ffi_c.so
|
362
376
|
- spec/ffi/bool_spec.rb
|
363
377
|
- spec/ffi/buffer_spec.rb
|
364
378
|
- spec/ffi/callback_spec.rb
|