moving rest of var stuff

This commit is contained in:
Ed Hartnett 2018-11-13 17:03:11 -07:00
parent d7fe095066
commit 6a66ecd3d0
3 changed files with 1 additions and 11 deletions

View File

@ -161,7 +161,7 @@ typedef struct NC_VAR_INFO
int parallel_access; /* Type of parallel access for I/O on variable (collective or independent) */
nc_bool_t dimscale; /* True if var is a dimscale */
nc_bool_t *dimscale_attached; /* Array of flags that are true if dimscale is attached for that dim index */
HDF5_OBJID_T *dimscale_hdf5_objids;
/* HDF5_OBJID_T *dimscale_hdf5_objids; */
nc_bool_t deflate; /* True if var has deflate filter applied */
int deflate_level;
nc_bool_t shuffle; /* True if var has shuffle filter applied */

View File

@ -876,17 +876,11 @@ read_var(NC_GRP_INFO_T *grp, hid_t datasetid, const char *obj_name,
/* Store id information allowing us to match hdf5
* dimscales to netcdf dimensions. */
if (!(var->dimscale_hdf5_objids = malloc(ndims *
sizeof(struct hdf5_objid))))
BAIL(NC_ENOMEM);
if (!(hdf5_var->dimscale_hdf5_objids = malloc(ndims *
sizeof(struct hdf5_objid))))
BAIL(NC_ENOMEM);
for (d = 0; d < var->ndims; d++)
{
if (H5DSiterate_scales(hdf5_var->hdf_datasetid, d, NULL, dimscale_visitor,
&(var->dimscale_hdf5_objids[d])) < 0)
BAIL(NC_EHDFERR);
if (H5DSiterate_scales(hdf5_var->hdf_datasetid, d, NULL, dimscale_visitor,
&(hdf5_var->dimscale_hdf5_objids[d])) < 0)
BAIL(NC_EHDFERR);

View File

@ -1207,10 +1207,6 @@ var_free(NC_VAR_INFO_T *var)
if ((retval = nc4_type_free(var->type_info)))
return retval;
/* Delete any HDF5 dimscale objid information. */
if (var->dimscale_hdf5_objids)
free(var->dimscale_hdf5_objids);
/* Delete information about the attachment status of dimscales. */
if (var->dimscale_attached)
free(var->dimscale_attached);