From ea3103c15ecddf752e23e63bcad6d1da13912619 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 11 Jun 2004 15:18:43 -0500 Subject: [svn-r8661] Purpose: Add comments. Description: More comments to clarify action. Platforms tested: No code change, no test. --- src/H5Tcommit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 3a3b7a1..757bb8c 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -148,7 +148,8 @@ H5T_commit (H5G_entry_t *loc, const char *name, H5T_t *type, hid_t dxpl_id) if(H5T_is_sensible(type)!=TRUE) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datatype is not sensible"); - /* Mark datatype as being on disk now */ + /* Mark datatype as being on disk now. This step changes the size of datatype as + * stored on disk. */ if(H5T_set_loc(type, file, H5T_LOC_DISK)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") @@ -164,7 +165,8 @@ H5T_commit (H5G_entry_t *loc, const char *name, H5T_t *type, hid_t dxpl_id) HGOTO_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to name data type"); type->state = H5T_STATE_OPEN; - /* Mark datatype as being on memory now */ + /* Mark datatype as being on memory now. Since this datatype may still be used in memory + * after committed to disk, change its size back as in memory. */ if(H5T_set_loc(type, NULL, H5T_LOC_MEMORY)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype in memory") -- cgit v0.12