diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-05-22 16:35:58 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-05-22 16:35:58 (GMT) |
commit | 9a8c664ff0d9884b8ce2bde543685245cb73f6bb (patch) | |
tree | f6a04fd044a933223aece09d5b855b56384666fd /src/H5Dint.c | |
parent | 948722cde8db7f53866393ada4c08b88b2a91e3e (diff) | |
download | hdf5-9a8c664ff0d9884b8ce2bde543685245cb73f6bb.zip hdf5-9a8c664ff0d9884b8ce2bde543685245cb73f6bb.tar.gz hdf5-9a8c664ff0d9884b8ce2bde543685245cb73f6bb.tar.bz2 |
[svn-r27104] Add support for printf-style source dataset name resolution.
Passes use case test, no regression tests yet.
Add functions H5Pset/get_virtual_printf_gap (not tested yet).
Other minor fixes/cleanup.
Tested: ummon
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index c1e3ad0..c3c13ef 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1556,18 +1556,30 @@ H5D_close(H5D_t *dataset) case H5D_VIRTUAL: { - size_t i; + size_t i, j; HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); /* Close source datasets */ - for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) - if(dataset->shared->layout.storage.u.virt.list[i].source_dset) { - HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset != dataset); - if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset) < 0) + for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) { + /* Close source dataset */ + if(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) { + HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset != dataset); + if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") - dataset->shared->layout.storage.u.virt.list[i].source_dset = NULL; + dataset->shared->layout.storage.u.virt.list[i].source_dset.dset = NULL; } /* end if */ + + /* Close sub datasets */ + for(j = 0; j < dataset->shared->layout.storage.u.virt.list[i].sub_dset_nused; j++) + if(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset != dataset); + if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") + dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset = NULL; + } /* end if */ + } /* end for */ } /* end block */ break; @@ -2921,3 +2933,4 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_get_type() */ + |