/*
* call-seq:
* fix << count => integer
*
* Shifts _fix_ left _count_ positions (right if _count_ is negative).
*/
static VALUE
fix_lshift(x, y)
VALUE x, y;
{
long val, width;
val = NUM2LONG(x);
width = NUM2LONG(y);
if (width < 0)
return fix_rshift(x, LONG2FIX(-width));
if (width > (sizeof(VALUE)*CHAR_BIT-1)
|| ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
return rb_big_lshift(rb_int2big(val), y);
}
val = val << width;
return LONG2NUM(val);
}