Subject:
[ruby-ffi] char <= 256?
From:
rogerdpack
Date:
7/13/10 6:50 PM
To:
ruby-ffi

Hi 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] http://en.wikipedia.org/wiki/C_syntax#Primitive_data_types