diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1999-06-04 22:27:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1999-06-04 22:27:28 (GMT) |
commit | 2a10e682a13244d5c61982445f2d6ec5bc990a36 (patch) | |
tree | fd25460dfb65d05ee3b3f19a5b11fe728a0e7adf /src/H5A.c | |
parent | df96f4362a0872e832cb0b995e209da4e315cb9d (diff) | |
download | hdf5-2a10e682a13244d5c61982445f2d6ec5bc990a36.zip hdf5-2a10e682a13244d5c61982445f2d6ec5bc990a36.tar.gz hdf5-2a10e682a13244d5c61982445f2d6ec5bc990a36.tar.bz2 |
[svn-r1305] Checkpointing the VL datatype code. I believe the core functionality is here,
accessed with H5Tvlen_create, but I need to start writing tests now. Also the
more esoteric API calls (such as H5Tget_vlen_buf_size and the memory management
calls) aren't implemented yet.
Diffstat (limited to 'src/H5A.c')
-rw-r--r-- | src/H5A.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -242,6 +242,12 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type, "memory allocation failed for attribute info"); attr->name=HDstrdup(name); attr->dt=H5T_copy(type, H5T_COPY_ALL); + /* Mark any VL datatypes as being on disk now */ + if(H5T_get_class(attr->dt)==H5T_VLEN) { + if (H5T_vlen_set_loc(attr->dt, ent->file, H5T_VLEN_DISK)<0) { + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid VL location"); + } + } attr->ds=H5S_copy(space); attr->initialized = TRUE; /*for now, set to false later*/ @@ -955,6 +961,12 @@ H5Aget_type(hid_t attr_id) HRETURN_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to copy datatype"); } + /* Mark any VL datatypes as being in memory now */ + if(H5T_get_class(dst)==H5T_VLEN) { + if (H5T_vlen_set_loc(dst, NULL, H5T_VLEN_MEMORY)<0) { + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid VL location"); + } + } if (H5T_lock(dst, FALSE)<0) { H5T_close(dst); HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, |