// copyDatatype should be called by any function wishing to return // an existing Datatype from a Dataset or Attribute. func copyDatatype(id C.hid_t) (*Datatype, error) { hid := C.H5Tcopy(id) if err := checkID(hid); err != nil { return nil, err } return NewDatatype(hid), nil }
// copyDatatype should be called by any function wishing to return // an existing Datatype from a Dataset or Attribute. func copyDatatype(id C.hid_t) (*Datatype, error) { hid := C.H5Tcopy(id) err := h5err(C.herr_t(int(hid))) if err != nil { return nil, err } return NewDatatype(hid), nil }
// Copies an existing datatype. // hid_t H5Tcopy( hid_t dtype_id ) func (t *DataType) Copy() (*DataType, error) { hid := C.H5Tcopy(t.id) err := togo_err(C.herr_t(int(hid))) if err != nil { return nil, err } o := new_dtype(hid, t.rt) return o, err }
// Copies an existing datatype. func (t *Datatype) Copy() (*Datatype, error) { hid := C.H5Tcopy(t.id) err := h5err(C.herr_t(int(hid))) if err != nil { return nil, err } o := NewDatatype(hid, t.rt) return o, err }