From 604a96d9de8ef4c2ae2b92235755c6ba20f6ea61 Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 18 Feb 2018 00:38:35 +0000 Subject: [PATCH] ext/fiddle/lib/fiddle/pack.rb: pack "void *" properly on 32-bit Fixes: r62450 (commit 1aaeeb326e754c5c5db83fbf35f780f729a9dfed) ("long long is a C99ism") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/fiddle/lib/fiddle/pack.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/fiddle/lib/fiddle/pack.rb b/ext/fiddle/lib/fiddle/pack.rb index 5467d3de4b..22eccedb76 100644 --- a/ext/fiddle/lib/fiddle/pack.rb +++ b/ext/fiddle/lib/fiddle/pack.rb @@ -48,7 +48,7 @@ module Fiddle ALIGN_MAP[TYPE_LONG_LONG] = ALIGN_MAP[-TYPE_LONG_LONG] = ALIGN_LONG_LONG PACK_MAP[TYPE_LONG_LONG] = PACK_MAP[-TYPE_LONG_LONG] = "q" SIZE_MAP[TYPE_LONG_LONG] = SIZE_MAP[-TYPE_LONG_LONG] = SIZEOF_LONG_LONG - PACK_MAP[TYPE_VOIDP] = PACK_MAP[TYPE_LONG_LONG] # override + PACK_MAP[TYPE_VOIDP] = "q" if SIZEOF_LONG_LONG == SIZEOF_VOIDP end def align(addr, align)