Method: Roaring::Bitmap64#replace

Defined in:
ext/roaring/bitmap64.c

#replace(other) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
# File 'ext/roaring/bitmap64.c', line 52

static VALUE rb_roaring64_replace(VALUE self, VALUE other) {
    roaring64_bitmap_t *self_data = get_bitmap(self);
    roaring64_bitmap_t *other_data = get_bitmap(other);

    // FIXME: Very likely a newer version of CRoaring will have
    //roaring64_bitmap_overwrite(self_data, other_data);

    roaring64_bitmap_clear(self_data);
    roaring64_bitmap_or_inplace(self_data, other_data);

    return self;
}