diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Oalloc.c | 2 | ||||
-rw-r--r-- | src/H5Obtreek.c | 6 | ||||
-rw-r--r-- | src/H5Odrvinfo.c | 6 | ||||
-rw-r--r-- | src/H5Ofill.c | 4 | ||||
-rw-r--r-- | src/H5Olink.c | 2 | ||||
-rw-r--r-- | src/H5Orefcount.c | 6 | ||||
-rw-r--r-- | src/H5Osdspace.c | 2 | ||||
-rw-r--r-- | src/H5Oshared.c | 4 | ||||
-rw-r--r-- | src/H5P.c | 44 | ||||
-rw-r--r-- | src/H5Pdeprec.c | 168 | ||||
-rw-r--r-- | src/H5Pint.c | 6 | ||||
-rw-r--r-- | src/H5Ppublic.h | 22 | ||||
-rw-r--r-- | src/H5vers.txt | 1 | ||||
-rw-r--r-- | src/H5version.h | 15 |
14 files changed, 224 insertions, 64 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index d5f17e0..03eb956 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -724,7 +724,7 @@ H5O_alloc_new_chunk(H5F_t *f, uint8_t *end_msg = curr_msg->raw + curr_msg->raw_size; /* End of current message */ size_t gap_size = 0; /* Size of gap after current message */ size_t null_size = 0; /* Size of NULL message after current message */ - unsigned null_msgno; /* Index of NULL message after current message */ + unsigned null_msgno = 0; /* Index of NULL message after current message */ size_t total_size; /* Total size of available space "around" current message */ /* Check if the message is the last one in the chunk */ diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index 57f8f47..e116ff2 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -78,7 +78,7 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{ *------------------------------------------------------------------------- */ static void * -H5O_btreek_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, +H5O_btreek_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, const uint8_t *p) { H5O_btreek_t *mesg; /* Native message */ @@ -124,7 +124,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O_btreek_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) +H5O_btreek_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg; @@ -200,7 +200,7 @@ done: *------------------------------------------------------------------------- */ static size_t -H5O_btreek_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED *_mesg) +H5O_btreek_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void UNUSED *_mesg) { size_t ret_value; diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c index 727449b..fd2d049 100644 --- a/src/H5Odrvinfo.c +++ b/src/H5Odrvinfo.c @@ -79,7 +79,7 @@ const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{ *------------------------------------------------------------------------- */ static void * -H5O_drvinfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, +H5O_drvinfo_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, const uint8_t *p) { H5O_drvinfo_t *mesg; /* Native message */ @@ -138,7 +138,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O_drvinfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) +H5O_drvinfo_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg; @@ -224,7 +224,7 @@ done: *------------------------------------------------------------------------- */ static size_t -H5O_drvinfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg) +H5O_drvinfo_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void *_mesg) { const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg; size_t ret_value; diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 08f0d39..1335274 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -355,7 +355,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O_fill_new_encode(H5F_t *f, uint8_t *p, const void *_fill) +H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_fill) { const H5O_fill_t *fill = (const H5O_fill_t *)_fill; @@ -604,7 +604,7 @@ done: *------------------------------------------------------------------------- */ static size_t -H5O_fill_new_size(const H5F_t *f, const void *_fill) +H5O_fill_new_size(const H5F_t UNUSED *f, const void *_fill) { const H5O_fill_t *fill = (const H5O_fill_t *)_fill; size_t ret_value; diff --git a/src/H5Olink.c b/src/H5Olink.c index a11bf9a..175c937 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -119,7 +119,7 @@ H5O_link_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, const uint8_t *p) { H5O_link_t *lnk = NULL; /* Pointer to link message */ - size_t len; /* Length of a string in the message */ + size_t len = 0; /* Length of a string in the message */ unsigned char link_flags; /* Flags for encoding link info */ void *ret_value; /* Return value */ diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c index 2fd3f94..0a06d11 100644 --- a/src/H5Orefcount.c +++ b/src/H5Orefcount.c @@ -89,7 +89,7 @@ H5FL_DEFINE_STATIC(H5O_refcount_t); *------------------------------------------------------------------------- */ static void * -H5O_refcount_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, +H5O_refcount_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, const uint8_t *p) { H5O_refcount_t *refcount = NULL; /* Reference count */ @@ -137,7 +137,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O_refcount_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) +H5O_refcount_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg; @@ -271,7 +271,7 @@ H5O_refcount_free(void *mesg) */ static herr_t H5O_refcount_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src, - hbool_t *deleted, const H5O_copy_t *cpy_info, void UNUSED *udata) + hbool_t *deleted, const H5O_copy_t UNUSED *cpy_info, void UNUSED *udata) { FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_refcount_pre_copy_file) diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 5e8a7a4..79adf43 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -439,7 +439,7 @@ H5O_sdspace_free(void *mesg) *------------------------------------------------------------------------- */ static herr_t -H5O_sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src, +H5O_sdspace_pre_copy_file(H5F_t UNUSED *file_src, const void *mesg_src, hbool_t UNUSED *deleted, const H5O_copy_t UNUSED *cpy_info, void *_udata) { const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */ diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 5739016..e406065 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -555,9 +555,9 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst, +H5O_shared_copy_file(H5F_t UNUSED *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst, - hbool_t *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, + hbool_t UNUSED *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, hid_t dxpl_id) { const H5O_shared_t *shared_src = (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */ @@ -463,11 +463,11 @@ done: /*-------------------------------------------------------------------------- NAME - H5Pinsert + H5Pinsert2 PURPOSE Routine to insert a new property in a property list. USAGE - herr_t H5Pinsert(plist, name, size, value, prp_set, prp_get, prp_close) + herr_t H5Pinsert2(plist, name, size, value, prp_set, prp_get, prp_close) hid_t plist; IN: Property list to add property to const char *name; IN: Name of property to add size_t size; IN: Size of property in bytes @@ -600,52 +600,34 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -#ifdef H5_WANT_H5_V1_6_COMPAT herr_t -H5Pinsert(hid_t plist_id, const char *name, size_t size, void *value, - H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, - H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, - H5P_prp_close_func_t prp_close) -#else /* H5_WANT_H5_V1_6_COMPAT */ -herr_t -H5Pinsert(hid_t plist_id, const char *name, size_t size, void *value, +H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close) -#endif /* H5_WANT_H5_V1_6_COMPAT */ { H5P_genplist_t *plist; /* Property list to modify */ herr_t ret_value; /* return value */ - FUNC_ENTER_API(H5Pinsert, FAIL); -#ifdef H5_WANT_H5_V1_6_COMPAT - H5TRACE9("e","iszxxxxxx",plist_id,name,size,value,prp_set,prp_get, - prp_delete,prp_copy,prp_close); -#else /* H5_WANT_H5_V1_6_COMPAT */ + FUNC_ENTER_API(H5Pinsert2, FAIL); H5TRACE10("e","iszxxxxxxx",plist_id,name,size,value,prp_set,prp_get, prp_delete,prp_copy,prp_cmp,prp_close); -#endif /* H5_WANT_H5_V1_6_COMPAT */ /* Check arguments. */ if(NULL == (plist = H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name"); - if(size>0 && value==NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name") + if(size > 0 && value == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default") /* Create the new property list class */ -#ifdef H5_WANT_H5_V1_6_COMPAT - if((ret_value = H5P_insert(plist,name,size,value,prp_set,prp_get,prp_delete,prp_copy,NULL,prp_close)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist"); -#else /* H5_WANT_H5_V1_6_COMPAT */ - if((ret_value = H5P_insert(plist,name,size,value,prp_set,prp_get,prp_delete,prp_copy,prp_cmp,prp_close)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist"); -#endif /* H5_WANT_H5_V1_6_COMPAT */ + if((ret_value = H5P_insert(plist, name, size, value, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist") done: FUNC_LEAVE_API(ret_value); -} /* H5Pinsert() */ +} /* H5Pinsert2() */ /*-------------------------------------------------------------------------- @@ -1201,7 +1183,7 @@ done: Removes a property from a property list. Both properties which were in existance when the property list was created (i.e. properties registered with H5Pregister2) and properties added to the list after it was created - (i.e. added with H5Pinsert) may be removed from a property list. + (i.e. added with H5Pinsert2) may be removed from a property list. Properties do not need to be removed a property list before the list itself is closed, they will be released automatically when H5Pclose is called. The 'close' callback for this property is called before the property is @@ -1264,7 +1246,7 @@ done: 'copy' callback for the property, if one exists). If the property does not exist in the destination class or list, this call - is equivalent to calling H5Pregister2 or H5Pinsert (for a class or list, as + is equivalent to calling H5Pregister2 or H5Pinsert2 (for a class or list, as appropriate) and the 'create' callback will be called in the case of the property being copied into a list (if such a callback exists for the property). diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c index 924e68f..e6ff099 100644 --- a/src/H5Pdeprec.c +++ b/src/H5Pdeprec.c @@ -272,5 +272,173 @@ done: FUNC_LEAVE_API(ret_value); } /* H5Pregister1() */ + +/*-------------------------------------------------------------------------- + NAME + H5Pinsert1 + PURPOSE + Routine to insert a new property in a property list. + USAGE + herr_t H5Pinsert1(plist, name, size, value, prp_set, prp_get, prp_close) + hid_t plist; IN: Property list to add property to + const char *name; IN: Name of property to add + size_t size; IN: Size of property in bytes + void *value; IN: Pointer to the value for the property + H5P_prp_set_func_t prp_set; IN: Function pointer to property set callback + H5P_prp_get_func_t prp_get; IN: Function pointer to property get callback + H5P_prp_delete_func_t prp_delete; IN: Function pointer to property delete callback + H5P_prp_copy_func_t prp_copy; IN: Function pointer to property copy callback + H5P_prp_compare_func_t prp_cmp; IN: Function pointer to property compare callback + H5P_prp_close_func_t prp_close; IN: Function pointer to property close + callback + RETURNS + Returns non-negative on success, negative on failure. + DESCRIPTION + Inserts a temporary property into a property list. The property will + exist only in this property list object. The name of the property must not + already exist. The value must be provided unless the property is zero- + sized. Any of the callback routines may be set to NULL if they are not + needed. + + Zero-sized properties are allowed and do not store any data in the + property list. These may be used as flags to indicate the presence or + absence of a particular piece of information. The 'value' pointer for a + zero-sized property may be set to NULL. The property 'close' callback is + called for zero-sized properties, but the 'set' and 'get' callbacks are + never called. + + The 'set' callback is called before a new value is copied into the + property. H5P_prp_set_func_t is defined as: + typedef herr_t (*H5P_prp_set_func_t)(hid_t prop_id, const char *name, + size_t size, void *value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list being modified. + const char *name; IN: The name of the property being modified. + size_t size; IN: The size of the property value + void *new_value; IN/OUT: The value being set for the property. + The 'set' routine may modify the value to be set and those changes will be + stored as the value of the property. If the 'set' routine returns a + negative value, the new property value is not copied into the property and + the property list set routine returns an error value. + + The 'get' callback is called before a value is retrieved from the + property. H5P_prp_get_func_t is defined as: + typedef herr_t (*H5P_prp_get_func_t)(hid_t prop_id, const char *name, + size_t size, void *value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list being queried. + const char *name; IN: The name of the property being queried. + size_t size; IN: The size of the property value + void *value; IN/OUT: The value being retrieved for the property. + The 'get' routine may modify the value to be retrieved and those changes + will be returned to the calling function. If the 'get' routine returns a + negative value, the property value is returned and the property list get + routine returns an error value. + + The 'delete' callback is called when a property is deleted from a + property list. H5P_prp_del_func_t is defined as: + typedef herr_t (*H5P_prp_del_func_t)(hid_t prop_id, const char *name, + size_t size, void *value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list the property is deleted from. + const char *name; IN: The name of the property being deleted. + size_t size; IN: The size of the property value + void *value; IN/OUT: The value of the property being deleted. + The 'delete' routine may modify the value passed in, but the value is not + used by the library when the 'delete' routine returns. If the + 'delete' routine returns a negative value, the property list deletion + routine returns an error value but the property is still deleted. + + The 'copy' callback is called when a property list with this + property is copied. H5P_prp_copy_func_t is defined as: + typedef herr_t (*H5P_prp_copy_func_t)(const char *name, size_t size, + void *value); + where the parameters to the callback function are: + const char *name; IN: The name of the property being copied. + size_t size; IN: The size of the property value + void *value; IN: The value of the property being copied. + The 'copy' routine may modify the value to be copied and those changes will be + stored as the value of the property. If the 'copy' routine returns a + negative value, the new property value is not copied into the property and + the property list copy routine returns an error value. + + The 'compare' callback is called when a property list with this + property is compared to another property list. H5P_prp_compare_func_t is + defined as: + typedef int (*H5P_prp_compare_func_t)( void *value1, void *value2, + size_t size); + where the parameters to the callback function are: + const void *value1; IN: The value of the first property being compared. + const void *value2; IN: The value of the second property being compared. + size_t size; IN: The size of the property value + The 'compare' routine may not modify the values to be compared. The + 'compare' routine should return a positive value if VALUE1 is greater than + VALUE2, a negative value if VALUE2 is greater than VALUE1 and zero if VALUE1 + and VALUE2 are equal. + + The 'close' callback is called when a property list with this + property is being destroyed. H5P_prp_close_func_t is defined as: + typedef herr_t (*H5P_prp_close_func_t)(const char *name, size_t size, + void *value); + where the parameters to the callback function are: + const char *name; IN: The name of the property being closed. + size_t size; IN: The size of the property value + void *value; IN: The value of the property being closed. + The 'close' routine may modify the value passed in, but the value is not + used by the library when the 'close' routine returns. If the + 'close' routine returns a negative value, the property list close + routine returns an error value but the property list is still closed. + + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + The 'set' callback function may be useful to range check the value being + set for the property or may perform some tranformation/translation of the + value set. The 'get' callback would then [probably] reverse the + transformation, etc. A single 'get' or 'set' callback could handle + multiple properties by performing different actions based on the property + name or other properties in the property list. + + There is no 'create' callback routine for temporary property list + objects, the initial value is assumed to have any necessary setup already + performed on it. + + I would like to say "the property list is not closed" when a 'close' + routine fails, but I don't think that's possible due to other properties in + the list being successfully closed & removed from the property list. I + suppose that it would be possible to just remove the properties which have + successful 'close' callbacks, but I'm not happy with the ramifications + of a mangled, un-closable property list hanging around... Any comments? -QAK + + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, + H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, + H5P_prp_close_func_t prp_close) +{ + H5P_genplist_t *plist; /* Property list to modify */ + herr_t ret_value; /* return value */ + + FUNC_ENTER_API(H5Pinsert1, FAIL); + H5TRACE9("e","iszxxxxxx",plist_id,name,size,value,prp_set,prp_get, + prp_delete,prp_copy,prp_close); + + /* Check arguments. */ + if(NULL == (plist = H5I_object_verify(plist_id, H5I_GENPROP_LST))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + if(!name || !*name) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name") + if(size > 0 && value == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default") + + /* Create the new property list class */ + if((ret_value = H5P_insert(plist, name, size, value, prp_set, prp_get, prp_delete, prp_copy, NULL, prp_close)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist") + +done: + FUNC_LEAVE_API(ret_value); +} /* H5Pinsert1() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Pint.c b/src/H5Pint.c index 3147020..46eb293 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -3690,7 +3690,7 @@ done: Removes a property from a property list. Both properties which were in existance when the property list was created (i.e. properties registered with H5Pregister2) and properties added to the list after it was created - (i.e. added with H5Pinsert) may be removed from a property list. + (i.e. added with H5Pinsert2) may be removed from a property list. Properties do not need to be removed a property list before the list itself is closed, they will be released automatically when H5Pclose is called. The 'close' callback for this property is called before the property is @@ -3829,7 +3829,7 @@ done: 'copy' callback for the property, if one exists). If the property does not exist in the destination list, this call is - equivalent to calling H5Pinsert and the 'create' callback will be called + equivalent to calling H5Pinsert2 and the 'create' callback will be called (if such a callback exists for the property). GLOBAL VARIABLES @@ -3880,7 +3880,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name) /* Increment the number of properties in list */ dst_plist->nprops++; } /* end if */ - /* If not, get the information required to do an H5Pinsert with the property into the destination list */ + /* If not, get the information required to do an H5Pinsert2 with the property into the destination list */ else { /* Get the pointer to the source property */ prop=H5P_find_prop_plist(src_plist,name); diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 5d0c7d3..297798f 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -179,20 +179,10 @@ H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); -#ifdef H5_WANT_H5_V1_6_COMPAT -H5_DLL herr_t H5Pinsert(hid_t plist_id, const char *name, size_t size, - void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, - H5P_prp_delete_func_t prp_delete, - H5P_prp_copy_func_t prp_copy, - H5P_prp_close_func_t prp_close); -#else /* H5_WANT_H5_V1_6_COMPAT */ -H5_DLL herr_t H5Pinsert(hid_t plist_id, const char *name, size_t size, - void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, - H5P_prp_delete_func_t prp_delete, - H5P_prp_copy_func_t prp_copy, - H5P_prp_compare_func_t prp_cmp, - H5P_prp_close_func_t prp_close); -#endif /* H5_WANT_H5_V1_6_COMPAT */ +H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, + void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, + H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, void *value); H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size); @@ -426,6 +416,10 @@ H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); +H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, + void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, + H5P_prp_close_func_t prp_close); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5vers.txt b/src/H5vers.txt index 213af52..81e5656 100644 --- a/src/H5vers.txt +++ b/src/H5vers.txt @@ -59,6 +59,7 @@ FUNCTION: H5Eset_auto; ; v10, v18 FUNCTION: H5Ewalk; H5E_walk, H5E_error; v10, v18 FUNCTION: H5Gcreate; ; v10, v18 FUNCTION: H5Gopen; ; v10, v18 +FUNCTION: H5Pinsert; ; v14, v18 FUNCTION: H5Pregister; ; v14, v18 FUNCTION: H5Rget_obj_type; ; v16, v18 FUNCTION: H5Tcommit; ; v10, v18 diff --git a/src/H5version.h b/src/H5version.h index 11841d3..7f48122 100644 --- a/src/H5version.h +++ b/src/H5version.h @@ -94,6 +94,10 @@ #define H5Gopen_vers 1 #endif /* !defined(H5Gopen_vers) */ +#if !defined(H5Pinsert_vers) +#define H5Pinsert_vers 1 +#endif /* !defined(H5Pinsert_vers) */ + #if !defined(H5Pregister_vers) #define H5Pregister_vers 1 #endif /* !defined(H5Pregister_vers) */ @@ -291,6 +295,17 @@ #error "H5Gopen_vers set to invalid value" #endif /* H5Gopen_vers */ +#if !defined(H5Pinsert_vers) || H5Pinsert_vers == 2 +#ifndef H5Pinsert_vers +#define H5Pinsert_vers 2 +#endif /* H5Pinsert_vers */ +#define H5Pinsert H5Pinsert2 +#elif H5Pinsert_vers == 1 +#define H5Pinsert H5Pinsert1 +#else /* H5Pinsert_vers */ +#error "H5Pinsert_vers set to invalid value" +#endif /* H5Pinsert_vers */ + #if !defined(H5Pregister_vers) || H5Pregister_vers == 2 #ifndef H5Pregister_vers #define H5Pregister_vers 2 |