Method: Fiddle::Pointer#eql?
- Defined in:
- pointer.c
#==(other) ⇒ Boolean #eql?(other) ⇒ Boolean
Returns true if other
wraps the same pointer, otherwise returns false.
584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'pointer.c', line 584
static VALUE
rb_fiddle_ptr_eql(VALUE self, VALUE other)
{
void *ptr1, *ptr2;
if(!rb_obj_is_kind_of(other, rb_cPointer)) return Qfalse;
ptr1 = rb_fiddle_ptr2cptr(self);
ptr2 = rb_fiddle_ptr2cptr(other);
return ptr1 == ptr2 ? Qtrue : Qfalse;
}
|