diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-05-08 22:17:45 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-05-08 22:17:45 (GMT) |
commit | b69bd0771eba5810db3db25217d5f32dc479185e (patch) | |
tree | c783a54f7cd8ef2ff504299749f5e18486a0363d /src/H5Tenum.c | |
parent | 525b9f40e5c112b777a28d207ccb6fd454f156fc (diff) | |
parent | 0cc480d952e2e215f006fc172485fcbabc0f599f (diff) | |
download | hdf5-b69bd0771eba5810db3db25217d5f32dc479185e.zip hdf5-b69bd0771eba5810db3db25217d5f32dc479185e.tar.gz hdf5-b69bd0771eba5810db3db25217d5f32dc479185e.tar.bz2 |
Merge branch 'develop' into hdf5_1_10.sync
Diffstat (limited to 'src/H5Tenum.c')
-rw-r--r-- | src/H5Tenum.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/H5Tenum.c b/src/H5Tenum.c index f5263ed..ade7d08 100644 --- a/src/H5Tenum.c +++ b/src/H5Tenum.c @@ -57,23 +57,24 @@ H5Tenum_create(hid_t parent_id) H5T_t *dt = NULL; /*new enumeration data type */ hid_t ret_value; /*return value */ - FUNC_ENTER_API(FAIL) + FUNC_ENTER_API(H5I_INVALID_HID) H5TRACE1("i", "i", parent_id); /* Check args */ if(NULL == (parent = (H5T_t *)H5I_object_verify(parent_id, H5I_DATATYPE)) || H5T_INTEGER != parent->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an integer data type") /* Build new type */ if(NULL == (dt = H5T__enum_create(parent))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot create enum type") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "cannot create enum type") + /* Atomize the type */ if ((ret_value=H5I_register(H5I_DATATYPE, dt, TRUE))<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type atom") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type atom") done: FUNC_LEAVE_API(ret_value) -} +} /* end H5Tenum_create() */ /*------------------------------------------------------------------------- @@ -446,7 +447,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si done: if(copied_dt) - if(H5T_close(copied_dt) < 0) + if(H5T_close_real(copied_dt) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close data type"); if(!ret_value && alloc_name) H5MM_free(name); @@ -574,7 +575,7 @@ H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/) done: if(copied_dt) - if(H5T_close(copied_dt) < 0) + if(H5T_close_real(copied_dt) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close data type") FUNC_LEAVE_NOAPI(ret_value) |