summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 573ec6b..c1f9bf6 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -785,6 +785,10 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
if(pline->nused >= H5Z_MAX_NFILTERS)
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline")
+ /* Check for freshly allocated filter pipeline */
+ if(pline->version == 0)
+ pline->version = H5O_PLINE_VERSION_1;
+
/* Allocate additional space in the pipeline if it's full */
if(pline->nused >= pline->nalloc) {
H5O_pline_t x;
@@ -1236,6 +1240,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_delete() */
+
/*-------------------------------------------------------------------------
* Function: H5Zget_filter_info
*
@@ -1284,3 +1289,33 @@ done:
FUNC_LEAVE_API(ret_value)
}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_set_latest_version
+ *
+ * Purpose: Set the encoding for a I/O filter pipeline to the latest version.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 24, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Z_set_latest_version(H5O_pline_t *pline)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5Z_set_latest_version, FAIL)
+
+ /* Sanity check */
+ HDassert(pline);
+
+ /* Set encoding of I/O pipeline to latest version */
+ pline->version = H5O_PLINE_VERSION_LATEST;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5Z_set_latest_version() */
+