summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-12 11:52:23 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-12 11:52:23 +0000
commit7f24b0aabd4e1f6d0ff058a944508575a08eaa65 (patch)
tree4f002e246f71359365dc6f53b0fbd49cf52857c4 /ext
parent29c1321a8416077a18e7e9c9a84025e81ebfc562 (diff)
Merge fiddle-1.0.0.beta2 from upstream.
* ext/fiddle/closure.c: use directly declaration for standalone gem without internal.h. * Specify frozen string literal is true. * Update gemspec configuration for release version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/fiddle/closure.c3
-rw-r--r--ext/fiddle/extconf.rb8
-rw-r--r--ext/fiddle/fiddle.gemspec5
-rw-r--r--ext/fiddle/lib/fiddle.rb2
-rw-r--r--ext/fiddle/lib/fiddle/closure.rb2
-rw-r--r--ext/fiddle/lib/fiddle/cparser.rb2
-rw-r--r--ext/fiddle/lib/fiddle/function.rb2
-rw-r--r--ext/fiddle/lib/fiddle/import.rb2
-rw-r--r--ext/fiddle/lib/fiddle/pack.rb4
-rw-r--r--ext/fiddle/lib/fiddle/struct.rb2
-rw-r--r--ext/fiddle/lib/fiddle/types.rb2
-rw-r--r--ext/fiddle/lib/fiddle/value.rb2
-rwxr-xr-xext/fiddle/win32/libffi-config.rb2
13 files changed, 19 insertions, 19 deletions
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index f19091b..1a80b2b 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -1,6 +1,7 @@
#include <fiddle.h>
#include <ruby/thread.h>
-#include "internal.h" /* rb_thread_has_gvl_p */
+
+int ruby_thread_has_gvl_p(void); /* from internal.h */
VALUE cFiddleClosure;
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 9e244ed..2c33300 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'mkmf'
# :stopdoc:
@@ -41,12 +41,12 @@ begin
libffi.lib = "#{libffi.builddir}/.libs"
libffi.a = "#{libffi.lib}/libffi_convenience.#{$LIBEXT}"
nowarn = CONFIG.merge("warnflags"=>"")
- libffi.cflags = RbConfig.expand("$(CFLAGS)", nowarn)
+ libffi.cflags = RbConfig.expand("$(CFLAGS)".dup, nowarn)
ver = ver[/libffi-(.*)/, 1]
FileUtils.mkdir_p(libffi.dir)
libffi.opt = CONFIG['configure_args'][/'(-C)'/, 1]
- libffi.ldflags = RbConfig.expand("$(LDFLAGS) #{libpathflag([relative_from($topdir, "..")])} #{$LIBRUBYARG}")
+ libffi.ldflags = RbConfig.expand("$(LDFLAGS) #{libpathflag([relative_from($topdir, "..")])} #{$LIBRUBYARG}".dup)
libffi.arch = RbConfig::CONFIG['host']
if $mswin
unless find_executable(as = /x64/ =~ libffi.arch ? "ml64" : "ml")
@@ -77,7 +77,7 @@ begin
args << libffi.opt if libffi.opt
args.concat %W[
CC=#{cc} CFLAGS=#{libffi.cflags}
- CXX=#{cxx} CXXFLAGS=#{RbConfig.expand("$(CXXFLAGS)", nowarn)}
+ CXX=#{cxx} CXXFLAGS=#{RbConfig.expand("$(CXXFLAGS)".dup, nowarn)}
LD=#{ld} LDFLAGS=#{libffi.ldflags}
]
diff --git a/ext/fiddle/fiddle.gemspec b/ext/fiddle/fiddle.gemspec
index 3e54f47..054d7c0 100644
--- a/ext/fiddle/fiddle.gemspec
+++ b/ext/fiddle/fiddle.gemspec
@@ -1,14 +1,14 @@
# frozen_string_literal: true
Gem::Specification.new do |spec|
spec.name = "fiddle"
- spec.version = '1.0.0.beta1'
+ spec.version = '1.0.0.beta2'
spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
spec.summary = %q{A libffi wrapper for Ruby.}
spec.description = %q{A libffi wrapper for Ruby.}
spec.homepage = "https://github.com/ruby/fiddle"
- spec.license = "MIT"
+ spec.license = "BSD-2-Clause"
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"]
spec.bindir = "exe"
@@ -17,6 +17,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
- spec.add_development_dependency "minitest", "~> 4.0"
spec.add_development_dependency "rake-compiler"
end
diff --git a/ext/fiddle/lib/fiddle.rb b/ext/fiddle/lib/fiddle.rb
index 5208eb9..e9aa7e5 100644
--- a/ext/fiddle/lib/fiddle.rb
+++ b/ext/fiddle/lib/fiddle.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'fiddle.so'
require 'fiddle/function'
require 'fiddle/closure'
diff --git a/ext/fiddle/lib/fiddle/closure.rb b/ext/fiddle/lib/fiddle/closure.rb
index 0b9adbb..c865a63 100644
--- a/ext/fiddle/lib/fiddle/closure.rb
+++ b/ext/fiddle/lib/fiddle/closure.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module Fiddle
class Closure
diff --git a/ext/fiddle/lib/fiddle/cparser.rb b/ext/fiddle/lib/fiddle/cparser.rb
index 6b9da9f..d3b450b 100644
--- a/ext/fiddle/lib/fiddle/cparser.rb
+++ b/ext/fiddle/lib/fiddle/cparser.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module Fiddle
# A mixin that provides methods for parsing C struct and prototype signatures.
#
diff --git a/ext/fiddle/lib/fiddle/function.rb b/ext/fiddle/lib/fiddle/function.rb
index fcd90df..dd5e04e 100644
--- a/ext/fiddle/lib/fiddle/function.rb
+++ b/ext/fiddle/lib/fiddle/function.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module Fiddle
class Function
# The ABI of the Function.
diff --git a/ext/fiddle/lib/fiddle/import.rb b/ext/fiddle/lib/fiddle/import.rb
index 09429f6..59ab3ee 100644
--- a/ext/fiddle/lib/fiddle/import.rb
+++ b/ext/fiddle/lib/fiddle/import.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'fiddle'
require 'fiddle/struct'
require 'fiddle/cparser'
diff --git a/ext/fiddle/lib/fiddle/pack.rb b/ext/fiddle/lib/fiddle/pack.rb
index 6301068..3c9e3c8 100644
--- a/ext/fiddle/lib/fiddle/pack.rb
+++ b/ext/fiddle/lib/fiddle/pack.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'fiddle'
module Fiddle
@@ -101,7 +101,7 @@ module Fiddle
private
def parse_types(types)
- @template = ""
+ @template = "".dup
addr = 0
types.each{|t|
orig_addr = addr
diff --git a/ext/fiddle/lib/fiddle/struct.rb b/ext/fiddle/lib/fiddle/struct.rb
index 233a987..7c0dedb 100644
--- a/ext/fiddle/lib/fiddle/struct.rb
+++ b/ext/fiddle/lib/fiddle/struct.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'fiddle'
require 'fiddle/value'
require 'fiddle/pack'
diff --git a/ext/fiddle/lib/fiddle/types.rb b/ext/fiddle/lib/fiddle/types.rb
index 8a72635..8dc811d 100644
--- a/ext/fiddle/lib/fiddle/types.rb
+++ b/ext/fiddle/lib/fiddle/types.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module Fiddle
# Adds Windows type aliases to the including class for use with
# Fiddle::Importer.
diff --git a/ext/fiddle/lib/fiddle/value.rb b/ext/fiddle/lib/fiddle/value.rb
index ac318cf..a043b9b 100644
--- a/ext/fiddle/lib/fiddle/value.rb
+++ b/ext/fiddle/lib/fiddle/value.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'fiddle'
module Fiddle
diff --git a/ext/fiddle/win32/libffi-config.rb b/ext/fiddle/win32/libffi-config.rb
index 7a32a91..6abc9b2 100755
--- a/ext/fiddle/win32/libffi-config.rb
+++ b/ext/fiddle/win32/libffi-config.rb
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'fileutils'
basedir = File.dirname(__FILE__)