1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/fiddle] test: fix SetLastError's input type

https://github.com/ruby/fiddle/commit/ca5e6a0404
This commit is contained in:
Sutou Kouhei 2021-04-20 11:17:38 +09:00 committed by Nobuyoshi Nakada
parent 37d16bb9dc
commit 8c905349bb
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -101,7 +101,7 @@ module Fiddle
if WINDOWS
def test_win32_last_error
kernel32 = Fiddle.dlopen("kernel32")
args = [kernel32["SetLastError"], [TYPE_LONG], TYPE_VOID]
args = [kernel32["SetLastError"], [-TYPE_LONG], TYPE_VOID]
args << Function::STDCALL if Function.const_defined?(:STDCALL)
set_last_error = Function.new(*args)
assert_nil(Fiddle.win32_last_error)