Xmlrpc and 64bit systems

[email protected]@%$G$9!#e(B

xmlrpc e$B$K$Oe(B 32bit
e$B0J>[email protected]?t$r;}$F$J$$$h$&[email protected]_Dj$,$"$j$^$9!#e(B

config.rb
# allows integers greater than 32-bit if true
ENABLE_BIGINT = false

e$B$7$+$7!"3:EvItJ,$N%3!<%I$,0J2<$N$h$&$K$J$C$F$$$k$N$G!"e(B
64bit e$B4D6-$G$O4|BTDL$j$KF0:n$7$^$;$s!#e(B

when Fixnum
@writer.tag(“i4”, param.to_s)

when Bignum
if Config::ENABLE_BIGINT
@writer.tag(“i4”, param.to_s)
else
if param >= -(231) and param <= (231-1)
@writer.tag(“i4”, param.to_s)
else
raise “Bignum is too big! Must be signed 32-bit integer!”
end
end

[email protected]_Dj$rJ8;zDL$j!Ve(B32bit e$B0J>e$G%(%i!<!W$H$H$i$($k$J$i$P!"e(B
e$B$3$l$O0J2<$N%Q%C%A$G<#$j$^$9!#e(B

— lib/xmlrpc/create.rb (revision 16245)
+++ lib/xmlrpc/create.rb (working copy)
@@ -178,10 +178,7 @@ module XMLRPC
def conv2value(param)

    val = case param
  •   when Fixnum
    
  •     @writer.tag("i4", param.to_s)
    
  •   when Bignum
    
  •   when Fixnum, Bignum
         if Config::ENABLE_BIGINT
           @writer.tag("i4", param.to_s)
         else
    

e$B!Ve(B32bit e$B0J>e!W$G$J$/!"e(BFixnum
e$B$rD6$($k>l9g$H9M$($k$HJQ$o$C$F$-$^$9$,!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs