Module: RCStorable

Defined in:
ext/rcstorable.c

Class Method Summary collapse

Class Method Details

.thaw(str) ⇒ Object

Given a perl Storable frozen blob, decode it into a ruby data structure.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'ext/rcstorable.c', line 46

VALUE
thaw(VALUE self, VALUE str)
{
  if (str == Qnil) return Qnil; /* Do something logical with nil. */
  
  Check_Type(str, T_STRING);
  extern uchar *serialized, *serialized_end;

  serialized = RSTRING_PTR(str);
  serialized_end = serialized + RSTRING_LEN(str);
  
  read_magic_numbers();
  
  return read_object();
}