moving hdf5_objid field to hdf5-specific dim info

This commit is contained in:
Ed Hartnett 2018-11-08 11:05:20 -07:00
parent 856e4ead03
commit e88b98daaa
2 changed files with 12 additions and 2 deletions

View File

@ -1748,6 +1748,10 @@ read_scale(NC_GRP_INFO_T *grp, hid_t datasetid, const char *obj_name,
dimscale_created++;
new_hdf5_dim->hdf5_objid.fileno[0] = statbuf->fileno[0];
new_hdf5_dim->hdf5_objid.fileno[1] = statbuf->fileno[1];
new_hdf5_dim->hdf5_objid.objno[0] = statbuf->objno[0];
new_hdf5_dim->hdf5_objid.objno[1] = statbuf->objno[1];
new_dim->hdf5_objid.fileno[0] = statbuf->fileno[0];
new_dim->hdf5_objid.fileno[1] = statbuf->fileno[1];
new_dim->hdf5_objid.objno[0] = statbuf->objno[0];

View File

@ -2978,9 +2978,15 @@ nc4_rec_match_dimscales(NC_GRP_INFO_T *grp)
* match. */
for (g = grp; g && !finished; g = g->parent)
{
for(j=0;j<ncindexsize(g->dim);j++)
for (j = 0; j < ncindexsize(g->dim); j++)
{
if((dim = (NC_DIM_INFO_T*)ncindexith(g->dim,j)) == NULL) continue;
NC_HDF5_DIM_INFO_T *hdf5_dim;
dim = (NC_DIM_INFO_T *)ncindexith(g->dim, j);
assert(dim && dim->format_dim_info);
hdf5_dim = (NC_HDF5_DIM_INFO_T *)dim->format_dim_info;
/* Check for exact match to find identical
* objects in HDF5 file. */
if (var->dimscale_hdf5_objids[d].fileno[0] == dim->hdf5_objid.fileno[0] &&
var->dimscale_hdf5_objids[d].objno[0] == dim->hdf5_objid.objno[0] &&
var->dimscale_hdf5_objids[d].fileno[1] == dim->hdf5_objid.fileno[1] &&