[svn-r8646] *** empty log message ***

This commit is contained in:
Raymond Lu
2004-06-10 13:48:09 -05:00
parent 52fa2f94ca
commit 7ce626721c
4 changed files with 227 additions and 5 deletions

View File

@@ -140,13 +140,17 @@ H5T_commit (H5G_entry_t *loc, const char *name, H5T_t *type, hid_t dxpl_id)
if (H5T_STATE_IMMUTABLE==type->state)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "data type is immutable");
/* Find the insertion file */
if (NULL==(file=H5G_insertion_file(loc, name, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to find insertion point");
/* Check for a "sensible" datatype to store on disk */
if(H5T_is_sensible(type)!=TRUE)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datatype is not sensible");
/* Find the insertion file */
if (NULL==(file=H5G_insertion_file(loc, name, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to find insertion point");
/* Mark datatype as being on disk now */
if(H5T_set_loc(type, file, H5T_LOC_DISK)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk")
/*
* Create the object header and open it for write access. Insert the data
@@ -160,6 +164,10 @@ 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 */
if(H5T_set_loc(type, NULL, H5T_LOC_MEMORY)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype in memory")
done:
if (ret_value<0) {
if ((type->state==H5T_STATE_TRANSIENT || type->state==H5T_STATE_RDONLY) && H5F_addr_defined(type->ent.header)) {
@@ -170,6 +178,7 @@ done:
type->ent.header = HADDR_UNDEF;
}
}
FUNC_LEAVE_NOAPI(ret_value);
}