summaryrefslogtreecommitdiffstats
path: root/src/H5Pint.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2011-10-21 19:51:32 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2011-10-21 19:51:32 (GMT)
commitf22b7d2e1268549e343e141206ab143b88da25ed (patch)
treeeb22bac6752b7212cf2138cbb44caf70cc141d5b /src/H5Pint.c
parentfb1937371d160d267c6d18c88f49b59b67b663d9 (diff)
downloadhdf5-f22b7d2e1268549e343e141206ab143b88da25ed.zip
hdf5-f22b7d2e1268549e343e141206ab143b88da25ed.tar.gz
hdf5-f22b7d2e1268549e343e141206ab143b88da25ed.tar.bz2
[svn-r21646] Port r21603 to 1.8 branch
Purpose: Add generic skip list implementation Description: Added new H5SL_TYPE_GENERIC skip list type, which uses void *'s as keys and a client-supplied callback for key comparison. This was added to support the upcoming "merge named datatype" feature for H5Ocopy, but may be used in other places as well. Also added testing. Also fixed a potential bug with the H5SL_TYPE_OBJ implementation, and added testing for that. Tested: jam, koala, heiwa (h5committest), durandal
Diffstat (limited to 'src/H5Pint.c')
-rw-r--r--src/H5Pint.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 4ae274e..5a0c54d 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -650,11 +650,11 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
new_plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */
/* Initialize the skip list to hold the changed properties */
- if((new_plist->props = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((new_plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for changed properties")
/* Create the skip list for deleted properties */
- if((new_plist->del = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((new_plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for deleted properties")
/* Create the skip list to hold names of properties already seen
@@ -662,7 +662,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
* 'create' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR))== NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL))== NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
nseen = 0;
@@ -1468,7 +1468,7 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, hbool_t internal,
pclass->revision = H5P_GET_NEXT_REV; /* Get a revision number for the class */
/* Create the skip list for properties */
- if(NULL == (pclass->props = H5SL_create(H5SL_TYPE_STR)))
+ if(NULL == (pclass->props = H5SL_create(H5SL_TYPE_STR, NULL)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for properties")
/* Set callback functions and pass-along data */
@@ -1558,11 +1558,11 @@ H5P_create(H5P_genclass_t *pclass)
plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */
/* Create the skip list for changed properties */
- if((plist->props = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for changed properties")
/* Create the skip list for deleted properties */
- if((plist->del = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for deleted properties")
/* Create the skip list to hold names of properties already seen
@@ -1570,7 +1570,7 @@ H5P_create(H5P_genclass_t *pclass)
* 'create' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for seen properties")
/*
@@ -3359,7 +3359,7 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Create the skip list to hold names of properties already seen */
- if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
/* Walk through the changed properties in the list */
@@ -4316,7 +4316,7 @@ H5P_close(void *_plist)
* 'close' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
nseen = 0;