summaryrefslogtreecommitdiffstats
path: root/src/H5Toh.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-05 22:11:13 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-05 22:11:13 (GMT)
commit7a070012c08c4ef16a6effc01e03c2ca7cd8fa00 (patch)
tree1e1b8f704b43c9695e10475ba7d5dbb970be1856 /src/H5Toh.c
parente4a60d86caa7a76001dd4e09af246c4c0fad19ea (diff)
downloadhdf5-7a070012c08c4ef16a6effc01e03c2ca7cd8fa00.zip
hdf5-7a070012c08c4ef16a6effc01e03c2ca7cd8fa00.tar.gz
hdf5-7a070012c08c4ef16a6effc01e03c2ca7cd8fa00.tar.bz2
[svn-r22519] - many bug fixes
- still some unresolved issues with named datatypes
Diffstat (limited to 'src/H5Toh.c')
-rw-r--r--src/H5Toh.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5Toh.c b/src/H5Toh.c
index 7961706..8454467 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -29,7 +29,8 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Opkg.h" /* Object headers */
#include "H5Tpkg.h" /* Datatypes */
-
+#include "H5VLnative.h" /* Native Plugin */
+#include "H5VLprivate.h" /* VOL */
/****************/
/* Local Macros */
@@ -146,6 +147,8 @@ H5O_dtype_open(const H5G_loc_t *obj_loc, hid_t UNUSED lapl_id, hid_t dxpl_id, hb
/* Register an ID for the datatype */
if((ret_value = H5I_register(H5I_DATATYPE, type, app_ref)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype")
+ if(H5VL_native_register_aux(ret_value) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach native vol info to ID")
done:
if(ret_value < 0)
@@ -216,15 +219,18 @@ done:
static H5O_loc_t *
H5O_dtype_get_oloc(hid_t obj_id)
{
- H5T_t *type; /* Datatype opened */
+ H5T_t *type=NULL, *dt=NULL; /* Datatype opened */
H5O_loc_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get the datatype */
- if(NULL == (type = (H5T_t *)H5I_object(obj_id)))
+ if(NULL == (dt = (H5T_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_OHDR, H5E_BADATOM, NULL, "couldn't get object from ID")
+ if(NULL == (type = (H5T_t *)H5T_get_named_type(dt)))
+ type = dt;
+
/* Get the datatype's object header location */
if(NULL == (ret_value = H5T_oloc(type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object")