ffi 1.14.0-x86-mingw32 → 1.14.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/2.3/ffi_c.so +0 -0
- data/lib/2.4/ffi_c.so +0 -0
- data/lib/2.5/ffi_c.so +0 -0
- data/lib/2.6/ffi_c.so +0 -0
- data/lib/2.7/ffi_c.so +0 -0
- data/lib/ffi/pointer.rb +7 -21
- data/lib/ffi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59b764144f02af4cc91789909e7b82d18c942f1ed9b4e525a507d78ace59be0c
|
4
|
+
data.tar.gz: 3a9019cef1c9cd940be2b33d304eef5a8ba8849a6d7ec84e17c9902cc5838495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e07cd563092e4ab9f075cbc354df4598dd911dcfbd350d7939107df264220a9763c5cdd92b9a5d5695197fce23d9e93d2d06bcb8a2f7b3943351ecdf65716ba5
|
7
|
+
data.tar.gz: 051bf4d523f61fd83c787efb3534972b9fc51d6c5598e80ddb76237d49f4cd29d65d6e6fc9d0417dc2710171b52adf1b15c98816d0ba8e1248d51a7527f315bd
|
data/CHANGELOG.md
CHANGED
data/lib/2.3/ffi_c.so
CHANGED
Binary file
|
data/lib/2.4/ffi_c.so
CHANGED
Binary file
|
data/lib/2.5/ffi_c.so
CHANGED
Binary file
|
data/lib/2.6/ffi_c.so
CHANGED
Binary file
|
data/lib/2.7/ffi_c.so
CHANGED
Binary file
|
data/lib/ffi/pointer.rb
CHANGED
@@ -85,37 +85,23 @@ module FFI
|
|
85
85
|
# @param [String] str string to write
|
86
86
|
# @param [Numeric] len length of string to return
|
87
87
|
# @return [self]
|
88
|
-
# Write +len+ first bytes of +str+ in pointer's contents
|
88
|
+
# Write +len+ first bytes of +str+ in pointer's contents.
|
89
89
|
#
|
90
90
|
# Same as:
|
91
91
|
# ptr.write_string(str, len) # with len not nil
|
92
92
|
def write_string_length(str, len)
|
93
|
-
|
93
|
+
put_bytes(0, str, 0, len)
|
94
94
|
end unless method_defined?(:write_string_length)
|
95
95
|
|
96
96
|
# @param [String] str string to write
|
97
97
|
# @param [Numeric] len length of string to return
|
98
98
|
# @return [self]
|
99
|
-
# Write +str+ in pointer's contents
|
100
|
-
#
|
101
|
-
# In both cases a final \0 byte is written after the string.
|
99
|
+
# Write +str+ in pointer's contents, or first +len+ bytes if
|
100
|
+
# +len+ is not +nil+.
|
102
101
|
def write_string(str, len=nil)
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
write_bytes(str, 0, len)
|
107
|
-
else
|
108
|
-
put_char(len, 0) # Check size before writing str
|
109
|
-
write_bytes(str, 0, len)
|
110
|
-
end
|
111
|
-
else
|
112
|
-
if str.bytesize == size
|
113
|
-
warn "[DEPRECATION] Memory too small to write a final 0-byte in #{caller(1, 1)[0]}. This will raise an error in ffi-2.0. Please use write_bytes instead or enlarge the memory region."
|
114
|
-
write_bytes(str)
|
115
|
-
else
|
116
|
-
put_string(0, str)
|
117
|
-
end
|
118
|
-
end
|
102
|
+
len = str.bytesize unless len
|
103
|
+
# Write the string data without NUL termination
|
104
|
+
put_bytes(0, str, 0, len)
|
119
105
|
end unless method_defined?(:write_string)
|
120
106
|
|
121
107
|
# @param [Type] type type of data to read from pointer's contents
|
data/lib/ffi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|