fiddle 1.1.3 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/fiddle/extconf.rb +10 -7
- data/ext/fiddle/fiddle.h +1 -0
- data/ext/fiddle/function.c +3 -1
- data/lib/fiddle/ffi_backend.rb +5 -2
- data/lib/fiddle/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0f57583928674b1ebb1313d3d079afd7f72b7103f1cdff830ef5aa77f868faa
|
4
|
+
data.tar.gz: 0c2d7bbb4d6efd3da8f8023cb9b0d8de11b9baa3ab4e4f82d13e126e7eb301fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c7a270b8a8d967fcff910335e93051d8aaddaa0617387598ce90031f1c92170f58ba255de84b742a16eb6a2b647df45b07c91ee712c5c34247a6adceaacadc6
|
7
|
+
data.tar.gz: 121958d7cc7be584a1146c3a1ded233ab52facc1f4a31e4e02e49a91b5293897b3e6ae9f5280264ecc5adfbf72165a84837c05a75a82eae70764f16f48d567ef
|
data/ext/fiddle/extconf.rb
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
require "rbconfig"
|
3
4
|
|
4
5
|
unless RUBY_ENGINE == "ruby"
|
5
|
-
File.write('Makefile',
|
6
|
+
File.write('Makefile', <<-MAKEFILE)
|
7
|
+
all install clean:
|
8
|
+
#{RbConfig::CONFIG["NULLCMD"]}
|
9
|
+
|
10
|
+
.PHONY: all install clean
|
11
|
+
MAKEFILE
|
6
12
|
return
|
7
13
|
end
|
8
14
|
|
15
|
+
require 'mkmf'
|
16
|
+
|
9
17
|
# :stopdoc:
|
10
18
|
|
11
19
|
def gcc?
|
@@ -68,11 +76,6 @@ unless bundle
|
|
68
76
|
end
|
69
77
|
if have_ffi_header && (have_library('ffi') || have_library('libffi'))
|
70
78
|
have_libffi = true
|
71
|
-
checking_for("undefined FFI_GO_CLOSURES is used") do
|
72
|
-
if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1")
|
73
|
-
$defs.push('-DFFI_GO_CLOSURES=0')
|
74
|
-
end
|
75
|
-
end
|
76
79
|
end
|
77
80
|
end
|
78
81
|
|
data/ext/fiddle/fiddle.h
CHANGED
data/ext/fiddle/function.c
CHANGED
@@ -154,7 +154,9 @@ initialize(int argc, VALUE argv[], VALUE self)
|
|
154
154
|
if (args[kw_name] != Qundef) {
|
155
155
|
name = args[kw_name];
|
156
156
|
#ifdef HAVE_RB_STR_TO_INTERNED_STR
|
157
|
-
|
157
|
+
if (RB_TYPE_P(name, RUBY_T_STRING)) {
|
158
|
+
name = rb_str_to_interned_str(name);
|
159
|
+
}
|
158
160
|
#endif
|
159
161
|
}
|
160
162
|
if (args[kw_need_gvl] != Qundef) {
|
data/lib/fiddle/ffi_backend.rb
CHANGED
@@ -475,8 +475,11 @@ module Fiddle
|
|
475
475
|
RTLD_NOW = FFI::DynamicLibrary::RTLD_NOW
|
476
476
|
|
477
477
|
def initialize(libname = nil, flags = RTLD_LAZY | RTLD_GLOBAL)
|
478
|
-
|
479
|
-
|
478
|
+
begin
|
479
|
+
@lib = FFI::DynamicLibrary.open(libname, flags)
|
480
|
+
rescue LoadError, RuntimeError # LoadError for JRuby, RuntimeError for TruffleRuby
|
481
|
+
raise DLError, "Could not open #{libname}"
|
482
|
+
end
|
480
483
|
|
481
484
|
@open = true
|
482
485
|
|
data/lib/fiddle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fiddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
|
+
original_platform: ''
|
6
7
|
authors:
|
7
8
|
- Aaron Patterson
|
8
9
|
- SHIBATA Hiroshi
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2024-
|
12
|
+
date: 2024-11-09 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
14
|
description: A libffi wrapper for Ruby.
|
14
15
|
email:
|