summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-06-11 22:04:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-06-11 22:04:42 (GMT)
commita556665ad19e7a97ace5449673a26a4b581940b3 (patch)
tree784eb312e21ce0d13394288a95c66853fb60de57 /src/H5T.c
parent725578538a45b78895450c4d5ffd1cd04585abc8 (diff)
downloadhdf5-a556665ad19e7a97ace5449673a26a4b581940b3.zip
hdf5-a556665ad19e7a97ace5449673a26a4b581940b3.tar.gz
hdf5-a556665ad19e7a97ace5449673a26a4b581940b3.tar.bz2
[svn-r1332] Fixes to get the VL datatypes working. The only function currently working
is H5Tvlen_create().
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 17c9739..696f4ff 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3903,6 +3903,7 @@ H5Tvlen_create(hid_t base_id)
if (NULL==(dt=H5MM_calloc(sizeof(H5T_t)))) {
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
}
+ H5F_addr_undef (&(dt->ent.header));
dt->type = H5T_VLEN;
dt->parent = H5T_copy(base, H5T_COPY_ALL);
@@ -6942,3 +6943,41 @@ H5T_debug(H5T_t *dt, FILE *stream)
FUNC_LEAVE(SUCCEED);
}
+
+/*--------------------------------------------------------------------------
+ NAME
+ H5R_get_ref_type
+ PURPOSE
+ Retrieves the type of reference for a datatype
+ USAGE
+ H5R_type_t H5Tget_ref_type(dt)
+ H5T_t *dt; IN: datatype pointer for the reference datatype
+
+ RETURNS
+ Success: A reference type defined in H5Rpublic.h
+ Failure: H5R_BADTYPE
+ DESCRIPTION
+ Given a reference datatype object, this function returns the reference type
+ of the datatype.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+H5R_type_t
+H5T_get_ref_type(H5T_t *dt)
+{
+ H5R_type_t ret_value = H5R_BADTYPE;
+
+ FUNC_ENTER(H5T_get_ref_type, H5R_BADTYPE);
+
+ assert(dt);
+
+ if(dt->type==H5T_REFERENCE)
+ ret_value=dt->u.atomic.u.r.rtype;
+
+#ifdef LATER
+done:
+#endif /* LATER */
+ FUNC_LEAVE(ret_value);
+} /* end H5T_get_ref_type() */