ffi 0.3.4 → 0.3.5
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/Rakefile +5 -3
- data/ext/ffi_c/Invoker.c +4 -0
- data/ext/ffi_c/MemoryPointer.c +1 -1
- data/ext/ffi_c/MemoryPointer.h +1 -1
- data/ext/ffi_c/NativeLibrary.h +1 -1
- data/ext/ffi_c/Platform.h +1 -1
- data/ext/ffi_c/Pointer.h +1 -1
- data/ext/ffi_c/Struct.h +1 -1
- data/ext/ffi_c/ffi.c +1 -1
- data/ext/ffi_c/rbffi.h +5 -5
- data/gen/Rakefile +12 -0
- data/spec/ffi/struct_spec.rb +0 -1
- metadata +4 -2
data/Rakefile
CHANGED
@@ -31,7 +31,7 @@ PROJ.name = 'ffi'
|
|
31
31
|
PROJ.authors = 'Wayne Meissner'
|
32
32
|
PROJ.email = 'wmeissner@gmail.com'
|
33
33
|
PROJ.url = 'http://kenai.com/projects/ruby-ffi'
|
34
|
-
PROJ.version = '0.3.
|
34
|
+
PROJ.version = '0.3.5'
|
35
35
|
PROJ.rubyforge.name = 'ffi'
|
36
36
|
PROJ.readme_file = 'README.rdoc'
|
37
37
|
|
@@ -43,9 +43,11 @@ PROJ.ann.email[:server] = 'smtp.gmail.com'
|
|
43
43
|
|
44
44
|
# Gem specifications
|
45
45
|
PROJ.gem.need_tar = false
|
46
|
-
PROJ.gem.files = %w(LICENSE README.rdoc Rakefile) + Dir.glob("{ext,lib,spec}/**/*")
|
46
|
+
PROJ.gem.files = %w(LICENSE README.rdoc Rakefile) + Dir.glob("{ext,gen,lib,spec}/**/*")
|
47
47
|
PROJ.gem.platform = Gem::Platform::RUBY
|
48
|
-
|
48
|
+
|
49
|
+
# Override Mr. Bones autogenerated extensions and force ours in
|
50
|
+
PROJ.gem.extras['extensions'] = %w(ext/ffi_c/extconf.rb gen/Rakefile)
|
49
51
|
|
50
52
|
# RDoc
|
51
53
|
PROJ.rdoc.exclude << '^ext\/'
|
data/ext/ffi_c/Invoker.c
CHANGED
data/ext/ffi_c/MemoryPointer.c
CHANGED
data/ext/ffi_c/MemoryPointer.h
CHANGED
data/ext/ffi_c/NativeLibrary.h
CHANGED
data/ext/ffi_c/Platform.h
CHANGED
data/ext/ffi_c/Pointer.h
CHANGED
@@ -9,7 +9,7 @@ extern "C" {
|
|
9
9
|
|
10
10
|
|
11
11
|
extern void rb_FFI_Pointer_Init(void);
|
12
|
-
extern void rb_FFI_NullPointer_Init();
|
12
|
+
extern void rb_FFI_NullPointer_Init(void);
|
13
13
|
extern VALUE rb_FFI_Pointer_new(void* addr);
|
14
14
|
extern VALUE rb_FFI_Pointer_class;
|
15
15
|
extern VALUE rb_FFI_NullPointer_class;
|
data/ext/ffi_c/Struct.h
CHANGED
data/ext/ffi_c/ffi.c
CHANGED
data/ext/ffi_c/rbffi.h
CHANGED
@@ -9,11 +9,11 @@ extern "C" {
|
|
9
9
|
|
10
10
|
#define MAX_PARAMETERS (32)
|
11
11
|
|
12
|
-
extern void rb_FFI_AbstractMemory_Init();
|
13
|
-
extern void rb_FFI_MemoryPointer_Init();
|
14
|
-
extern void rb_FFI_Buffer_Init();
|
15
|
-
extern void rb_FFI_Callback_Init();
|
16
|
-
extern void rb_FFI_Invoker_Init();
|
12
|
+
extern void rb_FFI_AbstractMemory_Init(void);
|
13
|
+
extern void rb_FFI_MemoryPointer_Init(void);
|
14
|
+
extern void rb_FFI_Buffer_Init(void);
|
15
|
+
extern void rb_FFI_Callback_Init(void);
|
16
|
+
extern void rb_FFI_Invoker_Init(void);
|
17
17
|
extern VALUE rb_FFI_AbstractMemory_class;
|
18
18
|
extern int rb_FFI_type_size(VALUE type);
|
19
19
|
|
data/gen/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require "#{File.join(ENV['RUBYLIBDIR'], 'ffi', 'tools', 'types_generator.rb')}"
|
3
|
+
types_conf = File.join(ENV['RUBYLIBDIR'], 'ffi', 'types.conf')
|
4
|
+
file types_conf do |task|
|
5
|
+
options = {}
|
6
|
+
FileUtils.mkdir_p(File.dirname(task.name), { :mode => 0755 })
|
7
|
+
File.open(task.name, File::CREAT|File::TRUNC|File::RDWR, 0644) do |f|
|
8
|
+
f.puts FFI::TypesGenerator.generate(options)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
task :default => types_conf do
|
12
|
+
end
|
data/spec/ffi/struct_spec.rb
CHANGED
@@ -393,7 +393,6 @@ describe FFI::Struct, ' with an array field' do
|
|
393
393
|
before do
|
394
394
|
@s = LibTest::StructWithArray.new
|
395
395
|
end
|
396
|
-
it 'should align correctly array field'
|
397
396
|
it 'should correctly calculate StructWithArray size (in bytes)' do
|
398
397
|
LibTest::StructWithArray.size.should == 24
|
399
398
|
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.3.
|
4
|
+
version: 0.3.5
|
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: 2009-05-
|
12
|
+
date: 2009-05-08 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -28,6 +28,7 @@ executables: []
|
|
28
28
|
|
29
29
|
extensions:
|
30
30
|
- ext/ffi_c/extconf.rb
|
31
|
+
- gen/Rakefile
|
31
32
|
extra_rdoc_files:
|
32
33
|
- README.rdoc
|
33
34
|
- lib/ffi
|
@@ -321,6 +322,7 @@ files:
|
|
321
322
|
- ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
|
322
323
|
- ext/ffi_c/libffi/texinfo.tex
|
323
324
|
- ext/ffi_c/rbffi.h
|
325
|
+
- gen/Rakefile
|
324
326
|
- lib/ffi
|
325
327
|
- lib/ffi.rb
|
326
328
|
- lib/ffi/autopointer.rb
|