static uintnat nativeint_deserialize(void * dst) { switch (caml_deserialize_uint_1()) { case 1: *((intnat *) dst) = caml_deserialize_sint_4(); break; case 2: #ifdef ARCH_SIXTYFOUR *((intnat *) dst) = caml_deserialize_sint_8(); #else caml_deserialize_error("input_value: native integer value too large"); #endif break; default: caml_deserialize_error("input_value: ill-formed native integer"); } return sizeof(long); }
static void caml_ba_deserialize_longarray(void * dest, intnat num_elts) { int sixty = caml_deserialize_uint_1(); #ifdef ARCH_SIXTYFOUR if (sixty) { caml_deserialize_block_8(dest, num_elts); } else { intnat * p, n; for (n = 0, p = dest; n < num_elts; n++, p++) *p = caml_deserialize_sint_4(); } #else if (sixty) caml_deserialize_error("input_value: cannot read bigarray " "with 64-bit OCaml ints"); caml_deserialize_block_4(dest, num_elts); #endif }
static uintnat int32_deserialize(void * dst) { *((int32 *) dst) = caml_deserialize_sint_4(); return 4; }