Subject: Re: [ruby-ffi] char <= 256? |
From: Wayne Meissner |
Date: 7/13/10 7:04 PM |
To: ruby-ffi@googlegroups.com |
File an issue for it. I was going to remove the checks on integers and just silently slice them to the appropriate size, but haven't gotten around to doing so. You could also work around that one by changing the parameter type for that function to :uchar (or :ushort, :uint, :ulong - they all get passed the same on win32). On 14 July 2010 09:50, rogerdpack <rogerpack2005@gmail.com> wrote:
http://en.wikipedia.org/wiki/C_syntax#Primitive_data_typesHi all. Got this recently. C:\dev\ruby\universal-scene-skipper\lib>ruby mute.rb mute.rb:32:in `keybd_event': Value 173 outside char range (RangeError) from mute.rb:32:in `<module:Win>' from mute.rb:19:in `<main>' a bit surprising, since char types in C are quite happy to accept such numbers. So is this a bug because of such? It appears that's it's ambiguous [1] so could go either way. Thanks! -r [1]