fiddle 1.0.0.beta1 → 1.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +2 -2
- data/LICENSE.txt +20 -19
- data/README.md +2 -3
- data/Rakefile +1 -1
- data/ext/fiddle/closure.c +1 -1
- data/ext/fiddle/extconf.rb +13 -4
- data/ext/fiddle/extlibs +4 -1
- data/ext/fiddle/win32/libffi-config.rb +1 -1
- data/fiddle.gemspec +4 -6
- data/lib/fiddle.rb +1 -1
- data/lib/fiddle/closure.rb +1 -1
- data/lib/fiddle/cparser.rb +1 -1
- data/lib/fiddle/function.rb +1 -1
- data/lib/fiddle/import.rb +1 -1
- data/lib/fiddle/pack.rb +2 -2
- data/lib/fiddle/struct.rb +1 -1
- data/lib/fiddle/types.rb +1 -1
- data/lib/fiddle/value.rb +1 -1
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c95f026d86d58a824f9925f5a57d8cebbf00e0a
|
4
|
+
data.tar.gz: ec3332b0ef7aadc1e47bf5d563e61232410395f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7173bf1fa4282f82118ce7dbe0064b170dc0c21ba6d99fbb7e52e356a6ad9710ba2c47e2225e56a2b9052358a8a7763228f302fc3ffbff97555fc2eca9fe6115
|
7
|
+
data.tar.gz: a271e17bc2a5626e05fff933991829d377333325269a3d4daec33fc70bb524d1d2c1ab36bf749b0e27e17aec5949313ec51aab7dc9c16215fed753d988415f58
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,21 +1,22 @@
|
|
1
|
-
|
1
|
+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
|
2
2
|
|
3
|
-
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
4
|
+
modification, are permitted provided that the following conditions
|
5
|
+
are met:
|
6
|
+
1. Redistributions of source code must retain the above copyright
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
|
+
2. Redistributions in binary form must reproduce the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
4
11
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
13
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
14
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
15
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
16
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
17
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
18
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
19
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
20
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
21
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
22
|
+
SUCH DAMAGE.
|
data/README.md
CHANGED
@@ -32,10 +32,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/fiddle.
|
36
36
|
|
37
37
|
|
38
38
|
## License
|
39
39
|
|
40
|
-
The gem is available as open source under the terms of the [
|
41
|
-
|
40
|
+
The gem is available as open source under the terms of the [BSD-2-Clause](https://opensource.org/licenses/BSD-2-Clause).
|
data/Rakefile
CHANGED
data/ext/fiddle/closure.c
CHANGED
data/ext/fiddle/extconf.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: true
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
4
|
# :stopdoc:
|
@@ -18,6 +18,15 @@ if ! bundle
|
|
18
18
|
end and (have_library('ffi') || have_library('libffi'))
|
19
19
|
end or
|
20
20
|
begin
|
21
|
+
if bundle
|
22
|
+
require "fileutils"
|
23
|
+
require_relative "../../bin/extlibs"
|
24
|
+
extlibs = ExtLibs.new
|
25
|
+
cache_dir = File.expand_path("../../tmp/.download_cache", $srcdir)
|
26
|
+
ext_dir = File.expand_path("../../ext", $srcdir)
|
27
|
+
Dir.glob("#{$srcdir}/libffi-*/").each{|dir| FileUtils.rm_rf(dir)}
|
28
|
+
extlibs.run(["--cache=#{cache_dir}", ext_dir])
|
29
|
+
end
|
21
30
|
ver = bundle != false &&
|
22
31
|
Dir.glob("#{$srcdir}/libffi-*/")
|
23
32
|
.map {|n| File.basename(n)}
|
@@ -41,12 +50,12 @@ begin
|
|
41
50
|
libffi.lib = "#{libffi.builddir}/.libs"
|
42
51
|
libffi.a = "#{libffi.lib}/libffi_convenience.#{$LIBEXT}"
|
43
52
|
nowarn = CONFIG.merge("warnflags"=>"")
|
44
|
-
libffi.cflags = RbConfig.expand("$(CFLAGS)", nowarn)
|
53
|
+
libffi.cflags = RbConfig.expand("$(CFLAGS)".dup, nowarn)
|
45
54
|
ver = ver[/libffi-(.*)/, 1]
|
46
55
|
|
47
56
|
FileUtils.mkdir_p(libffi.dir)
|
48
57
|
libffi.opt = CONFIG['configure_args'][/'(-C)'/, 1]
|
49
|
-
libffi.ldflags = RbConfig.expand("$(LDFLAGS) #{libpathflag([relative_from($topdir, "..")])} #{$LIBRUBYARG}")
|
58
|
+
libffi.ldflags = RbConfig.expand("$(LDFLAGS) #{libpathflag([relative_from($topdir, "..")])} #{$LIBRUBYARG}".dup)
|
50
59
|
libffi.arch = RbConfig::CONFIG['host']
|
51
60
|
if $mswin
|
52
61
|
unless find_executable(as = /x64/ =~ libffi.arch ? "ml64" : "ml")
|
@@ -77,7 +86,7 @@ begin
|
|
77
86
|
args << libffi.opt if libffi.opt
|
78
87
|
args.concat %W[
|
79
88
|
CC=#{cc} CFLAGS=#{libffi.cflags}
|
80
|
-
CXX=#{cxx} CXXFLAGS=#{RbConfig.expand("$(CXXFLAGS)", nowarn)}
|
89
|
+
CXX=#{cxx} CXXFLAGS=#{RbConfig.expand("$(CXXFLAGS)".dup, nowarn)}
|
81
90
|
LD=#{ld} LDFLAGS=#{libffi.ldflags}
|
82
91
|
]
|
83
92
|
|
data/ext/fiddle/extlibs
CHANGED
@@ -1,2 +1,5 @@
|
|
1
|
-
ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
|
1
|
+
ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz \
|
2
|
+
md5:83b89587607e3eb65c70d361f13bab43 \
|
3
|
+
sha512:980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 \
|
4
|
+
#
|
2
5
|
win32/libffi-3.2.1-mswin.patch -p0
|
data/fiddle.gemspec
CHANGED
@@ -1,23 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
Gem::Specification.new do |spec|
|
2
3
|
spec.name = "fiddle"
|
3
|
-
spec.version = '1.0.0.
|
4
|
+
spec.version = '1.0.0.beta2'
|
4
5
|
spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
|
5
6
|
spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
|
6
7
|
|
7
8
|
spec.summary = %q{A libffi wrapper for Ruby.}
|
8
9
|
spec.description = %q{A libffi wrapper for Ruby.}
|
9
10
|
spec.homepage = "https://github.com/ruby/fiddle"
|
10
|
-
spec.license = "
|
11
|
+
spec.license = "BSD-2-Clause"
|
11
12
|
|
12
|
-
spec.files =
|
13
|
-
f.match(%r{^(test|spec|features)/})
|
14
|
-
end
|
13
|
+
spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "ext/fiddle/closure.c", "ext/fiddle/closure.h", "ext/fiddle/conversions.c", "ext/fiddle/conversions.h", "ext/fiddle/extconf.rb", "ext/fiddle/extlibs", "ext/fiddle/fiddle.c", "ext/fiddle/fiddle.h", "ext/fiddle/function.c", "ext/fiddle/function.h", "ext/fiddle/handle.c", "ext/fiddle/pointer.c", "ext/fiddle/win32/fficonfig.h", "ext/fiddle/win32/libffi-3.2.1-mswin.patch", "ext/fiddle/win32/libffi-config.rb", "ext/fiddle/win32/libffi.mk.tmpl", "fiddle.gemspec", "lib/fiddle.rb", "lib/fiddle/closure.rb", "lib/fiddle/cparser.rb", "lib/fiddle/function.rb", "lib/fiddle/import.rb", "lib/fiddle/pack.rb", "lib/fiddle/struct.rb", "lib/fiddle/types.rb", "lib/fiddle/value.rb"]
|
15
14
|
spec.bindir = "exe"
|
16
15
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
16
|
spec.require_paths = ["lib"]
|
18
17
|
|
19
18
|
spec.add_development_dependency "bundler"
|
20
19
|
spec.add_development_dependency "rake"
|
21
|
-
spec.add_development_dependency "minitest", "~> 4.0"
|
22
20
|
spec.add_development_dependency "rake-compiler"
|
23
21
|
end
|
data/lib/fiddle.rb
CHANGED
data/lib/fiddle/closure.rb
CHANGED
data/lib/fiddle/cparser.rb
CHANGED
data/lib/fiddle/function.rb
CHANGED
data/lib/fiddle/import.rb
CHANGED
data/lib/fiddle/pack.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: true
|
2
2
|
require 'fiddle'
|
3
3
|
|
4
4
|
module Fiddle
|
@@ -101,7 +101,7 @@ module Fiddle
|
|
101
101
|
private
|
102
102
|
|
103
103
|
def parse_types(types)
|
104
|
-
@template = ""
|
104
|
+
@template = "".dup
|
105
105
|
addr = 0
|
106
106
|
types.each{|t|
|
107
107
|
orig_addr = addr
|
data/lib/fiddle/struct.rb
CHANGED
data/lib/fiddle/types.rb
CHANGED
data/lib/fiddle/value.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fiddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -39,20 +39,6 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: minitest
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - "~>"
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '4.0'
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - "~>"
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '4.0'
|
56
42
|
- !ruby/object:Gem::Dependency
|
57
43
|
name: rake-compiler
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,7 +97,7 @@ files:
|
|
111
97
|
- lib/fiddle/value.rb
|
112
98
|
homepage: https://github.com/ruby/fiddle
|
113
99
|
licenses:
|
114
|
-
-
|
100
|
+
- BSD-2-Clause
|
115
101
|
metadata: {}
|
116
102
|
post_install_message:
|
117
103
|
rdoc_options: []
|
@@ -129,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
115
|
version: 1.3.1
|
130
116
|
requirements: []
|
131
117
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.6.
|
118
|
+
rubygems_version: 2.6.13
|
133
119
|
signing_key:
|
134
120
|
specification_version: 4
|
135
121
|
summary: A libffi wrapper for Ruby.
|