summaryrefslogtreecommitdiffstats
path: root/test/lheap.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-09-18 19:27:45 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-09-18 19:27:45 (GMT)
commit1440f2c2db7cce110052d5363796b634b676090f (patch)
tree864f8f7e86ed7cd8c492578a9d7fd288dff04bb4 /test/lheap.c
parentfec0297f869e1f34bd4bb4fc0cb91ac403b73ccb (diff)
downloadhdf5-1440f2c2db7cce110052d5363796b634b676090f.zip
hdf5-1440f2c2db7cce110052d5363796b634b676090f.tar.gz
hdf5-1440f2c2db7cce110052d5363796b634b676090f.tar.bz2
[svn-r7490] Purpose:
Update Description: Removed the call to H5HL_peek Platforms tested: Modi4 (paralle, Fortran) Sol (Fortran) Linux (C++, Fortran) Copper (Parallel, Fortran) Misc. update:
Diffstat (limited to 'test/lheap.c')
-rw-r--r--test/lheap.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/lheap.c b/test/lheap.c
index 1c240d6..6389a33 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -110,14 +110,24 @@ main(void)
goto error;
}
for (i=0; i<NOBJS; i++) {
+ H5HL_t *heap = NULL;
+
sprintf(buf, "%03d-", i);
for (j=4; j<i; j++) buf[j] = '0' + j%10;
if (j>4) buf[j] = '\0';
- if (NULL==(s=H5HL_peek(f, H5P_DATASET_XFER_DEFAULT, heap_addr, obj[i]))) {
+
+ if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr))) {
+ H5_FAILED();
+ H5Eprint(H5E_DEFAULT, stdout);
+ goto error;
+ }
+
+ if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
H5_FAILED();
H5Eprint(H5E_DEFAULT, stdout);
goto error;
}
+
if (strcmp(s, buf)) {
H5_FAILED();
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
@@ -125,6 +135,12 @@ main(void)
printf(" ans: \"%s\"\n", buf);
goto error;
}
+
+ if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ H5_FAILED();
+ H5Eprint(H5E_DEFAULT, stdout);
+ goto error;
+ }
}
if (H5Fclose(file)<0) goto error;
PASSED();