src/bignum-gem.c
static mrb_value
big_rshift_large(mrb_state *mrb, mrb_value self)
{
  int result = (mpz_cmp_si(MPZ(self), 0) < 0) ? -1 : 0;
#if FIXNUM_CONVERT
  return mrb_fixnum_value(result);
#else
  mpz_t bigresult;
  mrb_value out;

  mpz_init_set_si(bigresult, result);
  out = new_bignum(mrb, bigresult, FALSE);
  mpz_clear(bigresult);
  return out;
#endif
}
/* Result of right shift that is deemed too large */
Result of right shift that is deemed too large
Result of right shift that is deemed too large
static mrb_value
big_rshift_large(mrb_state *mrb, mrb_value self)
{
  int result = (mpz_cmp_si(MPZ(self), 0) < 0) ? -1 : 0;
#if FIXNUM_CONVERT
  return mrb_fixnum_value(result);
#else
  mpz_t bigresult;
  mrb_value out;
  mpz_init_set_si(bigresult, result);
  out = new_bignum(mrb, bigresult, FALSE);
  mpz_clear(bigresult);
  return out;
#endif
}
static mrb_value big_rshift_large ( mrb_state * mrb , mrb_value self ) { int result = ( mpz_cmp_si ( MPZ ( self ) , 0 ) < 0 ) ? -1 : 0 ; #if FIXNUM_CONVERT return mrb_fixnum_value ( result ) ; #else mpz_t bigresult ; mrb_value out ; mpz_init_set_si ( bigresult , result ) ; out = new_bignum ( mrb , bigresult , FALSE ) ; mpz_clear ( bigresult ) ; return out ; #endif }
Result of right shift that is deemed too large
Result of right shift that is deemed too large