Method: Containers::Bitset#marshal_dump
- Defined in:
- ext/containers/bitset/bitset.c
#marshal_dump ⇒ Object
391 392 393 394 395 396 397 398 399 400 |
# File 'ext/containers/bitset/bitset.c', line 391
static VALUE rb_bitset_marshall_dump(VALUE self) {
Bitset * bs = get_bitset(self);
VALUE hash = rb_hash_new();
VALUE data = rb_str_new((const char *) bs->data, BYTES(bs));
rb_hash_aset(hash, ID2SYM(rb_intern("len")), UINT2NUM(bs->len));
rb_hash_aset(hash, ID2SYM(rb_intern("data")), data);
return hash;
}
|