Skip to content
Browse files

Fake out SIZEOF_BDIGITS properly like in 1.8 mode

SIZEOF_BDIGITS and RBIGNUM_LEN need to match up. Fixes a test failure in
sqlite3-ruby.
  • Loading branch information...
1 parent 8e3d14f commit f75cda9acd3962d4239ed299a4c3cd07d6521d91 @dbussink dbussink committed Nov 13, 2012
Showing with 3 additions and 21 deletions.
  1. +3 −21 vm/capi/19/include/ruby/ruby.h
View
24 vm/capi/19/include/ruby/ruby.h
@@ -950,27 +950,9 @@ VALUE rb_uint2big(unsigned long number);
#define RBIGNUM_POSITIVE_P(b) RBIGNUM_SIGN(b)
#define RBIGNUM_NEGATIVE_P(b) (!RBIGNUM_SIGN(b))
-#if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
-# define BDIGIT unsigned int
-# define SIZEOF_BDIGITS SIZEOF_INT
-# define BDIGIT_DBL unsigned LONG_LONG
-# define BDIGIT_DBL_SIGNED LONG_LONG
-#elif SIZEOF_INT*2 <= SIZEOF_LONG
-# define BDIGIT unsigned int
-# define SIZEOF_BDIGITS SIZEOF_INT
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-#elif SIZEOF_SHORT*2 <= SIZEOF_LONG
-# define BDIGIT unsigned short
-# define SIZEOF_BDIGITS SIZEOF_SHORT
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-#else
-# define BDIGIT unsigned short
-# define SIZEOF_BDIGITS (SIZEOF_LONG/2)
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-#endif
+ // fake out, used with RBIGNUM_LEN anyway, which provides
+ // the full answer
+#define SIZEOF_BDIGITS 1
/** Calls this method in a superclass. */
VALUE rb_call_super(int argc, const VALUE *argv);

0 comments on commit f75cda9

Please sign in to comment.
Something went wrong with that request. Please try again.