summaryrefslogtreecommitdiffstats
path: root/src/H5Odtype.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2009-07-13 16:26:24 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2009-07-13 16:26:24 (GMT)
commit8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5 (patch)
tree89b912ff750a20ae63bd8f8d31801f69f7379504 /src/H5Odtype.c
parent39ad4fae0f60e34d09a4fff4322fb3767eea2e56 (diff)
downloadhdf5-8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5.zip
hdf5-8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5.tar.gz
hdf5-8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5.tar.bz2
[svn-r17177] In H5Odtype.c, the decoding function used to mark the datatype as on disk (see bug
#1585). I changed it to undefined and let the caller functions decide the location of the datatype. For H5Tdecode, it should mark the datatype as in memory. For other callers like H5Dopen or H5Aopen, they should makr it as on disk. Tested it on jam, smirom, linew.
Diffstat (limited to 'src/H5Odtype.c')
-rw-r--r--src/H5Odtype.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index fe8c627..47fdd7e 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -452,8 +452,9 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
/* Set extra information for object references, so the hobj_ref_t gets swizzled correctly */
if(dt->shared->u.atomic.u.r.rtype == H5R_OBJECT) {
- /* This type is on disk */
- dt->shared->u.atomic.u.r.loc = H5T_LOC_DISK;
+ /* Mark location this type as undefined for now. The caller function should
+ * decide the location. */
+ dt->shared->u.atomic.u.r.loc = H5T_LOC_BADLOC;
/* This type needs conversion */
dt->shared->force_conv = TRUE;
@@ -518,9 +519,16 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
ioflags, "vlen", FAIL)
dt->shared->force_conv=TRUE;
- /* Mark this type as on disk */
- if(H5T_set_loc(dt, f, H5T_LOC_DISK) < 0)
+
+#ifdef TMP
+ /* Mark location this type as undefined for now. The caller function should
+ * decide the location. */
+ if(H5T_set_loc(dt, f, H5T_LOC_BADLOC) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location")
+else
+ if(H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location")
+#endif
break;
case H5T_ARRAY: /* Array datatypes */