VALUE read_any_raw(unsigned char **pData) { switch(peek_1(pData)) { case ERL_SMALL_INT: return read_small_int(pData); break; case ERL_INT: return read_int(pData); break; case ERL_FLOAT: return read_float(pData); break; case ERL_ATOM: return read_atom(pData); break; case ERL_PID: return read_pid(pData); break; case ERL_SMALL_TUPLE: return read_small_tuple(pData); break; case ERL_LARGE_TUPLE: return read_large_tuple(pData); break; case ERL_NIL: return read_nil(pData); break; case ERL_STRING: return read_string(pData); break; case ERL_LIST: return read_list(pData); break; case ERL_BIN: return read_bin(pData); break; case ERL_SMALL_BIGNUM: return read_small_bignum(pData); break; case ERL_LARGE_BIGNUM: return read_large_bignum(pData); break; case ERL_NEW_REF: return read_new_reference(pData); break; } return Qnil; }
VALUE read_any_raw(unsigned char **pData, VALUE forceToEncoding) { switch(peek_1(pData)) { case ERL_SMALL_INT: return read_small_int(pData); break; case ERL_INT: return read_int(pData); break; case ERL_FLOAT: return read_float(pData); break; case ERL_ATOM: return read_atom(pData); break; case ERL_SMALL_TUPLE: return read_small_tuple(pData, forceToEncoding); break; case ERL_LARGE_TUPLE: return read_large_tuple(pData, forceToEncoding); break; case ERL_NIL: return read_nil(pData); break; case ERL_STRING: return read_string(pData, forceToEncoding); break; case ERL_LIST: return read_list(pData, forceToEncoding); break; case ERL_BIN: return read_bin(pData, forceToEncoding); break; case ERL_SMALL_BIGNUM: return read_small_bignum(pData); break; case ERL_LARGE_BIGNUM: return read_large_bignum(pData); break; } return Qnil; }