message: feat(c-api) Implement `wasm_$name_vec_t::is_uninitialized()`.
diff: @@ -56,22 +56,24 @@ macro_rules! wasm_declare_vec {
  impl [<wasm_ $name _vec_t>] {
  pub unsafe fn into_slice(&self) -> Option<&[[<wasm_ $name _t>]]>{
  - if self.data.is_null() {
  + if self.is_unitialized() {
  return None;
  }
  Some(::std::slice::from_raw_parts(self.data, self.size))
  }
  - }
  - impl [<wasm_ $name _vec_t>] {
  pub unsafe fn into_slice_mut(&self) -> Option<&mut [[<wasm_ $name _t>]]>{
  - if self.data.is_null() {
  + if self.is_unitialized() {
  return None;
  }
  Some(::std::slice::from_raw_parts_mut(self.data, self.size))
  }
  +
  + pub fn is_unitialized(&self) -> bool {
  + self.data.is_null()
  + }
  }
  // TODO: investigate possible memory leak on `init` (owned pointer)
  