mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use built-in Win32API on JRuby
It's fixed for JRuby dedicatedly.
This commit is contained in:
parent
309f6a7726
commit
136116819e
1 changed files with 34 additions and 30 deletions
|
@ -11,6 +11,9 @@ class Reline::Windows
|
|||
[224, 79] => :ed_move_to_end, # End
|
||||
}.each_key(&:freeze).freeze
|
||||
|
||||
if defined? JRUBY_VERSION
|
||||
require 'win32api'
|
||||
else
|
||||
class Win32API
|
||||
DLL = {}
|
||||
TYPEMAP = {"0" => Fiddle::TYPE_VOID, "S" => Fiddle::TYPE_VOIDP, "I" => Fiddle::TYPE_LONG}
|
||||
|
@ -48,6 +51,7 @@ class Reline::Windows
|
|||
return ret || 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
VK_MENU = 0x12
|
||||
VK_SHIFT = 0x10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue