diff options
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 78 |
1 files changed, 78 insertions, 0 deletions
@@ -3471,7 +3471,9 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref/*out*/) /* Get values */ if (gc_ref) + if(H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME, gc_ref) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference"); done: @@ -3480,6 +3482,82 @@ done: /*------------------------------------------------------------------------- + * Function: H5Pset_fclose_degree + * + * Purpose: Sets the degree for the file close behavior. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * November, 2001 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pset_fclose_degree(hid_t plist_id, H5F_close_degree_t degree) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value=SUCCEED; /* return value */ + + FUNC_ENTER(H5Pset_fclose_degree, FAIL); + + /* Check args */ + if(TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + + /* Get the plist structure */ + if(NULL == (plist = H5I_object(plist_id))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + + /* Set values */ + if(H5P_set(plist, H5F_CLOSE_DEGREE_NAME, °ree) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree"); + +done: + FUNC_LEAVE(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5Pget_fclose_degree + * + * Purpose: Returns the current setting for the garbage collection + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * June, 1999 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t H5Pget_fclose_degree(hid_t plist_id, H5F_close_degree_t *degree) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value=SUCCEED; /* return value */ + + FUNC_ENTER(H5Pget_fclose_degree, FAIL); + + /* Check args */ + if(TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + + /* Get the plist structure */ + if(NULL == (plist = H5I_object(plist_id))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + + if( degree && (H5P_get(plist, H5F_CLOSE_DEGREE_NAME, degree) < 0) ) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree"); + +done: + FUNC_LEAVE(ret_value); +} + + +/*------------------------------------------------------------------------- * Function: H5P_set_vlen_mem_manager * * Purpose: Sets the memory allocate/free pair for VL datatypes. The |