ruby-changes:14898
From: akr <ko1@a...>
Date: Fri, 26 Feb 2010 20:12:31 +0900 (JST)
Subject: [ruby-changes:14898] Ruby:r26767 (trunk): * pack.c (QUAD_SIZE): it should be always 8.
akr 2010-02-26 20:09:29 +0900 (Fri, 26 Feb 2010) New Revision: 26767 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26767 Log: * pack.c (QUAD_SIZE): it should be always 8. * bignum.c (rb_quad_pack): use LONG_LONG version only if SIZEOF_LONG_LONG == QUAD_SIZE. Modified files: trunk/ChangeLog trunk/bignum.c trunk/pack.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26766) +++ ChangeLog (revision 26767) @@ -1,3 +1,10 @@ +Fri Feb 26 20:07:48 2010 Tanaka Akira <akr@f...> + + * pack.c (QUAD_SIZE): it should be always 8. + + * bignum.c (rb_quad_pack): use LONG_LONG version only if + SIZEOF_LONG_LONG == QUAD_SIZE. + Fri Feb 26 16:49:29 2010 Nobuyoshi Nakada <nobu@r...> * pack.c (swap64): fix for VC6. Index: pack.c =================================================================== --- pack.c (revision 26766) +++ pack.c (revision 26767) @@ -266,11 +266,7 @@ return 0; /* not reached */ } -#ifdef HAVE_LONG_LONG -# define QUAD_SIZE SIZEOF_LONG_LONG -#else -# define QUAD_SIZE 8 -#endif +#define QUAD_SIZE 8 static const char toofew[] = "too few arguments"; static void encodes(VALUE,const char*,long,int,int); Index: bignum.c =================================================================== --- bignum.c (revision 26766) +++ bignum.c (revision 26767) @@ -304,8 +304,10 @@ return rb_int2big(n); } -#if SIZEOF_BDIGITS*2 == SIZEOF_LONG_LONG +#define QUAD_SIZE 8 +#if SIZEOF_LONG_LONG == QUAD_SIZE && SIZEOF_BDIGITS*2 == SIZEOF_LONG_LONG + void rb_quad_pack(char *buf, VALUE val) { @@ -374,8 +376,6 @@ #else -#define QUAD_SIZE 8 - void rb_quad_pack(char *buf, VALUE val) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/