mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
currenly pack/unpack does not accept "q!" and "Q!". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
da098bd36e
commit
b2ba3242ea
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Feb 9 16:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
|
||||
currenly pack/unpack does not accept "q!" and "Q!".
|
||||
|
||||
Thu Feb 9 16:01:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* ext/fiddle/conversions.c (value_to_generic): src is not guranteed as
|
||||
|
|
|
@ -13,7 +13,7 @@ module DL
|
|||
when TYPE_LONG
|
||||
[val].pack("l!").unpack("L!")[0]
|
||||
when TYPE_LONG_LONG
|
||||
[val].pack("q!").unpack("Q!")[0]
|
||||
[val].pack("q").unpack("Q")[0]
|
||||
else
|
||||
val
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ module DL
|
|||
when TYPE_LONG
|
||||
[val].pack("L!").unpack("l!")[0]
|
||||
when TYPE_LONG_LONG
|
||||
[val].pack("Q!").unpack("q!")[0]
|
||||
[val].pack("Q").unpack("q")[0]
|
||||
else
|
||||
val
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue