diff options
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -5453,3 +5453,32 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_patch_file() */ + +/*------------------------------------------------------------------------- + * Function: H5T_patch_vlen_file + * + * Purpose: Patch the top-level file pointer contained in (dt->shared->u.vlen.f) + * to point to f. This is possible because + * the top-level file pointer can be closed out from under + * dt while dt is contained in the shared file's cache. + * + * Return: SUCCEED + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_patch_vlen_file(H5T_t *dt, H5F_t *f) +{ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + /* Sanity check */ + HDassert(dt); + HDassert(dt->shared); + HDassert(f); + + if((dt->shared->type == H5T_VLEN) && dt->shared->u.vlen.f != f) + dt->shared->u.vlen.f = f; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5T_patch_vlen_file() */ + |