summaryrefslogtreecommitdiffstats
path: root/src/H5Tdeprec.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-08-26 22:09:17 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-08-26 22:09:17 (GMT)
commite271be083c2b7a542d282c52df41cd307c8e136f (patch)
tree66cb747bb72160e843ac93cbeea9300a8967a2b7 /src/H5Tdeprec.c
parent39af44b6f2501df56998a2458db3551fc232a422 (diff)
downloadhdf5-e271be083c2b7a542d282c52df41cd307c8e136f.zip
hdf5-e271be083c2b7a542d282c52df41cd307c8e136f.tar.gz
hdf5-e271be083c2b7a542d282c52df41cd307c8e136f.tar.bz2
[svn-r25555] - rework the public H5VL wrappers to not use H5VL_t* and use a plugin hid_t instead
- rework the private VL layer to use the class structure directly - some bug fixes
Diffstat (limited to 'src/H5Tdeprec.c')
-rw-r--r--src/H5Tdeprec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index addbdfe..51c55f4 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -178,7 +178,7 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
/* commit the datatype through the VOL */
- if (NULL == (dt = H5VL_datatype_commit(obj, loc_params, vol_plugin, name, type_id,
+ if (NULL == (dt = H5VL_datatype_commit(obj, loc_params, vol_plugin->cls, name, type_id,
H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT,
H5P_DATATYPE_ACCESS_DEFAULT, H5AC_dxpl_id, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to commit datatype")
@@ -192,6 +192,10 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
if (H5I_register_aux(type_id, vol_plugin) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
+ vol_plugin->nrefs ++;
+ if(H5I_inc_ref(vol_plugin->id, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "unable to increment ref count on VOL plugin")
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcommit1() */
@@ -240,7 +244,7 @@ H5Topen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
/* Create the datatype through the VOL */
- if(NULL == (dt = H5VL_datatype_open(obj, loc_params, vol_plugin, name,
+ if(NULL == (dt = H5VL_datatype_open(obj, loc_params, vol_plugin->cls, name,
H5P_DATATYPE_ACCESS_DEFAULT, H5AC_dxpl_id, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open datatype")
@@ -250,7 +254,7 @@ H5Topen1(hid_t loc_id, const char *name)
done:
if (ret_value < 0 && dt)
- if(H5VL_datatype_close (dt, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0)
+ if(H5VL_datatype_close (dt, vol_plugin->cls, H5AC_dxpl_id, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Topen1() */