ffi-win32-extensions 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +4 -0
- data/ffi-win32-extensions.gemspec +1 -1
- data/lib/ffi/win32/extensions.rb +1 -1
- data/test/test_ffi_extensions.rb +10 -0
- metadata +3 -3
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73427e6e8cc496f2e8ce9cbf9b2a713bec9e4cab
|
4
|
+
data.tar.gz: aa09c51f1c39f81d5de44f76b8b5efd62704923f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ecb5849b690d0272b43a9f3dfa2c76278478d15e45f6c6ba9acec79c02d922ec8ca66ba3823784ce3ad209ef7a351f39ce29ccc2ad32ef714eef4bccf55e0c
|
7
|
+
data.tar.gz: 1fdb867ec07afccf0dfb740b96a67d1d836a0bb2197fbcb582f3eb8b3be65671df573afd4148c48e80b55ab4c484c5498068636827a3581acc3fe3d7ff0071fb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
data/lib/ffi/win32/extensions.rb
CHANGED
@@ -18,7 +18,7 @@ class FFI::Pointer
|
|
18
18
|
|
19
19
|
# Read +num_bytes+ from a wide character string pointer.
|
20
20
|
#
|
21
|
-
def read_wide_string(num_bytes)
|
21
|
+
def read_wide_string(num_bytes = self.size)
|
22
22
|
read_bytes(num_bytes).force_encoding('UTF-16LE')
|
23
23
|
.encode('UTF-8', :invalid => :replace, :undef => :replace)
|
24
24
|
.split(0.chr).first.force_encoding(Encoding.default_external)
|
data/test/test_ffi_extensions.rb
CHANGED
@@ -24,6 +24,16 @@ class TC_FFI_Win32_Extensions < Test::Unit::TestCase
|
|
24
24
|
assert_respond_to(FFI, :raise_windows_error)
|
25
25
|
end
|
26
26
|
|
27
|
+
test 'read_wide_string basic functionality' do
|
28
|
+
assert_respond_to(@ptr, :read_wide_string)
|
29
|
+
assert_kind_of(String, @ptr.read_wide_string)
|
30
|
+
end
|
31
|
+
|
32
|
+
test 'read_wide_string has optional argument' do
|
33
|
+
assert_nothing_raised{ @ptr.read_wide_string }
|
34
|
+
assert_nothing_raised{ @ptr.read_wide_string(@ptr.size) }
|
35
|
+
end
|
36
|
+
|
27
37
|
def teardown
|
28
38
|
@ptr.free
|
29
39
|
@ptr = nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-win32-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
31
31
|
tGSHgAmcLlkdGgan182qsE/4kKM=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-
|
33
|
+
date: 2016-08-21 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: ffi
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.5.1
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Extends the FFI and String classes on MS Windows
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
��t��c���?�w��c{�m��i�1j�6^�템@wW���d�i��w� �F���15ڏy+�m3ɗoU�d���,�5h�����.XG�H&�����"o���?V
|
2
|
+
�� �tV��8Е. ��9H}�K�eH'˛��(
|
3
|
+
��Wt�,_�'�S<eG �1L��r��ߪ�,�z.�Ņ���87ܱ��8�S�
|