From 7a96b1a0d2b943aa4c4187b4424bea8ae826ee5f Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 26 Sep 2001 15:29:35 -0500 Subject: [svn-r4482] Purpose: Kludge Description: Since we're only about halfway through converting the internal use of property lists from the "old way" to the generic property lists, we turned off snapshots to avoid exposing lots of API changes to users, until the APIs settled down. Getting the snapshots rolling again seems to have become a priority, so some changes are going to have to be made now that were going to be postponed until we were completely finished with the conversion. This requires that the old API functions be able to deal with both the old and new property lists smoothly. Solution: Kludge together the property list code so that they can transparently handle dealing with both the old and new property lists Platforms tested: FreeBSD 4.4 (hawkwind) --- c++/src/H5DcreatProp.cpp | 2 +- c++/src/H5DxferProp.cpp | 4 +- c++/src/H5FaccProp.cpp | 2 +- c++/src/H5FcreatProp.cpp | 2 +- c++/src/H5IdComponent.cpp | 2 +- c++/src/H5PropList.cpp | 42 ++-- c++/src/H5PropList.h | 11 +- fortran/src/H5Pf.c | 26 +-- fortran/src/H5_f.c | 2 +- perform/overhead.c | 10 +- release_docs/RELEASE.txt | 5 + src/H5.c | 567 ++++++++++++++++++++++++---------------------- src/H5D.c | 12 +- src/H5Distore.c | 4 +- src/H5Dseq.c | 4 +- src/H5FD.c | 12 +- src/H5Farray.c | 4 +- src/H5Fistore.c | 4 +- src/H5Fseq.c | 4 +- src/H5P.c | 186 ++++++++------- src/H5Pprivate.h | 8 +- src/H5Ppublic.h | 39 +++- test/cmpd_dset.c | 4 +- test/dsets.c | 8 +- test/tarray.c | 8 +- test/tselect.c | 10 +- test/tvlstr.c | 4 +- test/tvltypes.c | 16 +- tools/lib/talign.c | 4 +- 29 files changed, 525 insertions(+), 481 deletions(-) diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 4f3d2e4..ec5a10a 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -13,7 +13,7 @@ namespace H5 { #endif -const DSetCreatPropList DSetCreatPropList::DEFAULT( H5P_DEFAULT ); +const DSetCreatPropList DSetCreatPropList::DEFAULT( H5P_NO_CLASS ); // Copy constructor: makes a copy of the original DSetCreatPropList object; DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList( orig ) {} diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index 389db89..96444aa 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -11,10 +11,10 @@ namespace H5 { #endif -const DSetMemXferPropList DSetMemXferPropList::DEFAULT( H5P_DEFAULT ); +const DSetMemXferPropList DSetMemXferPropList::DEFAULT( H5P_NO_CLASS ); // Creates a dataset memory and transfer property list -DSetMemXferPropList::DSetMemXferPropList() : PropList( H5P_DATASET_XFER_NEW ) {} +DSetMemXferPropList::DSetMemXferPropList() : PropList( H5P_DATASET_XFER) {} // Copy constructor: makes a copy of the original DSetMemXferPropList object; DSetMemXferPropList::DSetMemXferPropList( const DSetMemXferPropList& orig ) : PropList( orig ) {} diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 4eae889..3ade17e 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -11,7 +11,7 @@ namespace H5 { #endif -const FileAccPropList FileAccPropList::DEFAULT( H5P_DEFAULT ); +const FileAccPropList FileAccPropList::DEFAULT( H5P_NO_CLASS ); // Creates a file access property list FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {} diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index d511595..3d4b21f 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -11,7 +11,7 @@ namespace H5 { #endif -const FileCreatPropList FileCreatPropList::DEFAULT( H5P_DEFAULT ); +const FileCreatPropList FileCreatPropList::DEFAULT( H5P_NO_CLASS ); // Creates a file create property list FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {} diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index d7ba7c4..1275ee5 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -12,7 +12,7 @@ namespace H5 { #endif // Default constructor - private -IdComponent::IdComponent() : id( 0 ) +IdComponent::IdComponent() : id( -1 ) { // starts counting object references ref_count = new RefCounter; diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 985d895..3982288 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -11,23 +11,12 @@ namespace H5 { #endif -const PropList PropList::DEFAULT( H5P_DEFAULT ); +const PropList PropList::DEFAULT( H5P_NO_CLASS ); // Default constructor - set id to 0 by default here but may be set // to a valid one, if any, by a subclass constructor. PropList::PropList() : IdComponent( 0 ) {} -// Creates a new property of specified type -PropList::PropList( H5P_class_t type ) : IdComponent( 0 ) -{ - // call C routine to create the new property - id = H5Pcreate(type ); - if( id <= 0 ) - { - throw PropListIException("PropList constructor", "H5Pcreate failed"); - } -} - // Copy constructor: makes a copy of the original object PropList::PropList( const PropList& original ) : IdComponent( original ) {} @@ -39,18 +28,25 @@ Description: the identifier still has reference counter; the p_close function will take care of not to call H5Pclose on the default id. */ -PropList::PropList( const hid_t plist_id ) : IdComponent() +PropList::PropList( const hid_t plist_id ) : IdComponent(0) { - if (H5I_GENPROP_CLS == H5Iget_type(plist_id)) { + if (H5I_GENPROP_CLS == H5Iget_type(plist_id) + || plist_id==H5P_FILE_CREATE + || plist_id==H5P_FILE_ACCESS + || plist_id==H5P_DATASET_CREATE + || plist_id==H5P_MOUNT) { // call C routine to create the new property - id = H5Pcreate_list(plist_id); + id = H5Pcreate(plist_id); if( id <= 0 ) { - throw PropListIException("PropList constructor", "H5Pcreate_list failed"); + throw PropListIException("PropList constructor", "H5Pcreate failed"); } } else { - id=plist_id; + if(plist_id==H5P_NO_CLASS) + id=H5P_DEFAULT; + else + id=plist_id; } } @@ -88,15 +84,11 @@ PropList& PropList::operator=( const PropList& rhs ) // Closes the property list if it is not a default one void PropList::p_close() const { - if( id != H5P_DEFAULT ) // not a constant, should call H5Pclose + if( id != H5P_NO_CLASS ) // not a constant, should call H5Pclose { herr_t ret_value; - if (H5I_GENPROP_LST == H5Iget_type(id)) { - ret_value = H5Pclose_list( id ); - } else { - ret_value = H5Pclose( id ); - } + ret_value = H5Pclose( id ); if( ret_value < 0 ) { @@ -106,9 +98,9 @@ void PropList::p_close() const } // Returns the class of this property list, i.e. H5P_FILE_CREATE... -H5P_class_t PropList::getClass() const +hid_t PropList::getClass() const { - H5P_class_t plist_class = H5Pget_class( id ); + hid_t plist_class = H5Pget_class( id ); if( plist_class == H5P_NO_CLASS ) { throw PropListIException("PropList::getClass", diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 037b0d8..c800ace 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -11,8 +11,9 @@ class PropList : public IdComponent { // Default property list static const PropList DEFAULT; - // Creates a property list given the property list type. - PropList( H5P_class_t type ); + // Creates a property list of a given type or creates a copy of an + // existing property list giving the property list id + PropList( const hid_t plist_id ); // Default constructor: creates a PropList object - this object // does not represent any property list yet. @@ -29,11 +30,7 @@ class PropList : public IdComponent { // Gets the class of this property list, i.e. H5P_FILE_CREATE, // H5P_FILE_ACCESS, ... - H5P_class_t getClass() const; - - // Creates a default property list or creates a copy of an - // existing property list giving the property list id - PropList( const hid_t plist_id ); + hid_t getClass() const; // Used by the API to close the property list void p_close() const; diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index fed1249..bac381c 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -15,12 +15,12 @@ int_f nh5pcreate_c ( int_f *classtype, hid_t_f *prp_id ) { - H5P_class_t c_classtype; + hid_t c_classtype; int CASE; int ret_value = 0; hid_t c_prp_id; /*CASE = (int)*classtype; */ - c_classtype = (H5P_class_t)*classtype; + c_classtype = (hid_t)*classtype; /* switch (CASE) { @@ -50,10 +50,7 @@ nh5pcreate_c ( int_f *classtype, hid_t_f *prp_id ) return ret_value; } */ - if (H5I_GENPROP_CLS == H5Iget_type((hid_t)*classtype)) - c_prp_id = H5Pcreate_list((hid_t)*classtype); - else - c_prp_id = H5Pcreate(c_classtype); + c_prp_id = H5Pcreate(c_classtype); if ( c_prp_id < 0 ) ret_value = -1; *prp_id = (hid_t_f)c_prp_id; @@ -76,11 +73,7 @@ nh5pclose_c ( hid_t_f *prp_id ) int ret_value = 0; hid_t c_prp_id=(*prp_id); - if (H5I_GENPROP_LST == H5Iget_type(c_prp_id)) { - if ( H5Pclose_list(c_prp_id) < 0 ) ret_value = -1; - } else { - if ( H5Pclose(c_prp_id) < 0 ) ret_value = -1; - } + if ( H5Pclose(c_prp_id) < 0 ) ret_value = -1; return ret_value; } @@ -133,24 +126,17 @@ nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype) { int ret_value = 0; hid_t c_prp_id; - H5P_class_t c_classtype; + hid_t c_classtype; c_prp_id = *prp_id; c_classtype = H5Pget_class(c_prp_id); if (c_classtype == H5P_NO_CLASS ) { - /* *classtype = H5P_NO_CLASS_F; */ *classtype = H5P_NO_CLASS; ret_value = -1; return ret_value; } *classtype = (int_f)c_classtype; -/* - if (c_classtype == H5P_FILE_CREATE) *classtype = H5P_FILE_CREATE_F; - if (c_classtype == H5P_FILE_ACCESS) *classtype = H5P_FILE_ACCESS_F; - if (c_classtype == H5P_DATASET_CREATE) *classtype = H5P_DATASET_CREATE_F; - if (c_classtype == H5P_DATASET_XFER) *classtype = H5P_DATASET_XFER_F; - if (c_classtype == H5P_MOUNT_F) *classtype = H5P_MOUNT_F; -*/ + return ret_value; } diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index b3f1a6c..83eb113 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -248,7 +248,7 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, int_f *h5f_flags, h5p_flags[0] = H5P_FILE_CREATE; h5p_flags[1] = H5P_FILE_ACCESS; h5p_flags[2] = H5P_DATASET_CREATE; - h5p_flags[3] = H5P_DATASET_XFER_NEW; + h5p_flags[3] = H5P_DATASET_XFER; h5p_flags[4] = H5P_MOUNT; h5p_flags[5] = H5P_DEFAULT; diff --git a/perform/overhead.c b/perform/overhead.c index 8be9ae2..cea8dac 100644 --- a/perform/overhead.c +++ b/perform/overhead.c @@ -199,7 +199,7 @@ test(fill_t fill_style, const double splits[], } if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error; if (H5Pset_chunk(dcpl, 1, ch_size)<0) goto error; - if ((xfer=H5Pcreate_list(H5P_DATASET_XFER_NEW))<0) goto error; + if ((xfer=H5Pcreate(H5P_DATASET_XFER))<0) goto error; if (H5Pset_btree_ratios(xfer, splits[0], splits[1], splits[2])<0) { goto error; } @@ -275,7 +275,7 @@ test(fill_t fill_style, const double splits[], H5Sclose(mspace); H5Sclose(fspace); H5Pclose(dcpl); - H5Pclose_list(xfer); + H5Pclose(xfer); H5Fclose(file); if (!verbose) { @@ -321,7 +321,7 @@ test(fill_t fill_style, const double splits[], H5Sclose(mspace); H5Sclose(fspace); H5Pclose(dcpl); - H5Pclose_list(xfer); + H5Pclose(xfer); H5Fclose(file); free(had); close(fd); @@ -356,11 +356,11 @@ main(int argc, char *argv[]) /* Default split ratios */ H5Eset_auto(display_error_cb, NULL); - if ((xfer=H5Pcreate_list(H5P_DATASET_XFER_NEW))<0) goto error; + if ((xfer=H5Pcreate(H5P_DATASET_XFER))<0) goto error; if (H5Pget_btree_ratios(xfer, splits+0, splits+1, splits+2)<0) { goto error; } - if (H5Pclose_list(xfer)<0) goto error; + if (H5Pclose(xfer)<0) goto error; /* Parse command-line options */ for (i=1, j=0; i=0 && asize[asize_idx]>=0) { - ssize_t *p = (ssize_t*)vp; - fprintf(out, " {"); - for (i=0; i=0 && asize[asize_idx]>=0) { + ssize_t *p = (ssize_t*)vp; + fprintf(out, " {"); + for (i=0; ichunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(ent->split_ratios)); /* Add it to the cache */ @@ -1644,7 +1644,7 @@ H5F_istore_unlock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, x.chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(x.split_ratios)); H5F_istore_flush_entry (f, &x, TRUE); diff --git a/src/H5Dseq.c b/src/H5Dseq.c index b1c7c3b..45a6815 100644 --- a/src/H5Dseq.c +++ b/src/H5Dseq.c @@ -174,7 +174,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { @@ -548,7 +548,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { diff --git a/src/H5FD.c b/src/H5FD.c index fb7d77b..62a866f 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -292,11 +292,11 @@ H5FD_get_class(hid_t id) } else if (H5I_VFL==H5I_get_type(id)) { ret_value = H5I_object(id); } else if (H5I_GENPROP_LST == H5I_get_type(id) && - TRUE==H5Pisa_class(id,H5P_DATASET_XFER_NEW)) { + TRUE==H5Pisa_class(id,H5P_DATASET_XFER)) { ret_value = H5FD_get_class(H5P_peek_hid_t(id,H5D_XFER_VFL_ID_NAME)); } else { switch (H5P_get_class(id)) { - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: if (NULL==(fapl=H5I_object(id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); @@ -1968,7 +1968,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size if (H5P_DEFAULT == dxpl_id) dxpl_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(dxpl_id) || - TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); if (!buf) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null result buffer"); @@ -2008,7 +2008,7 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz FUNC_ENTER(H5FD_read, FAIL); assert(file && file->cls); assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); assert(buf); #ifndef H5_HAVE_PARALLEL @@ -2121,7 +2121,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz if (H5P_DEFAULT == dxpl_id) dxpl_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(dxpl_id) || - TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); if (!buf) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null buffer"); @@ -2164,7 +2164,7 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t si FUNC_ENTER(H5FD_write, FAIL); assert(file && file->cls); assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); assert(buf); #ifndef H5_HAVE_PARALLEL diff --git a/src/H5Farray.c b/src/H5Farray.c index ff69cfa..54dd376 100644 --- a/src/H5Farray.c +++ b/src/H5Farray.c @@ -167,7 +167,7 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); /* Make a local copy of size so we can modify it */ H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size); @@ -454,7 +454,7 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); /* Make a local copy of _size so we can modify it */ H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size); diff --git a/src/H5Fistore.c b/src/H5Fistore.c index c5f12a3..4ddb4d4 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1501,7 +1501,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, ent->chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(ent->split_ratios)); /* Add it to the cache */ @@ -1644,7 +1644,7 @@ H5F_istore_unlock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, x.chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(x.split_ratios)); H5F_istore_flush_entry (f, &x, TRUE); diff --git a/src/H5Fseq.c b/src/H5Fseq.c index b1c7c3b..45a6815 100644 --- a/src/H5Fseq.c +++ b/src/H5Fseq.c @@ -174,7 +174,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { @@ -548,7 +548,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { diff --git a/src/H5P.c b/src/H5P.c index 0e8da7b..e1edc1b 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -34,6 +34,15 @@ static int interface_initialize_g = 0; #define INTERFACE_INIT H5P_init_interface static herr_t H5P_init_interface(void); +/* hid_t aliases for old H5P_class_t enum values */ +/* These go away as each old-style property list is converted to a generic */ +/* property list -QAK */ +hid_t H5P_NO_CLASS=(hid_t)H5P_NO_CLASS_OLD; +hid_t H5P_FILE_CREATE=(hid_t)H5P_FILE_CREATE_OLD; +hid_t H5P_FILE_ACCESS=(hid_t)H5P_FILE_ACCESS_OLD; +hid_t H5P_DATASET_CREATE=(hid_t)H5P_DATASET_CREATE_OLD; +hid_t H5P_MOUNT=(hid_t)H5P_MOUNT_OLD; + /* * Predefined property list classes. These are initialized at runtime by * H5P_init_interface() in this source file. @@ -167,14 +176,14 @@ H5P_init_interface(void) FUNC_ENTER(H5P_init_interface, FAIL); - assert(H5P_NCLASSES <= H5I_TEMPLATE_MAX - H5I_TEMPLATE_0); + assert(H5P_NCLASSES_OLD <= H5I_TEMPLATE_MAX - H5I_TEMPLATE_0); /* * Initialize the mappings between property list classes and atom * groups. We keep the two separate because property list classes are * publicly visible but atom groups aren't. */ - for (i = 0; i < H5P_NCLASSES; i++) { + for (i = 0; i < H5P_NCLASSES_OLD; i++) { status = H5I_init_group((H5I_type_t)(H5I_TEMPLATE_0 +i), H5I_TEMPID_HASHSIZE, 0, (H5I_free_t)H5P_close); if (status < 0) @@ -269,20 +278,20 @@ H5P_term_interface(void) /* Destroy HDF5 library property classes & lists */ /* Check if there are any open property list classes or lists */ - for (i=0; i= 0 && type < H5P_NCLASSES); + assert(type >= 0 && type < H5P_NCLASSES_OLD); assert(plist); /* Atomize the new property list */ @@ -427,13 +452,22 @@ H5Pclose(hid_t plist_id) /* Check arguments */ if (plist_id==H5P_DEFAULT) HRETURN(SUCCEED); - if (H5P_get_class (plist_id)<0) { - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); - } - - /* When the reference count reaches zero the resources are freed */ - if (H5I_dec_ref(plist_id) < 0) - HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing property list"); + + /* Kludge to detect generic property creations and divert them to the */ + /* generic property list creation routine - QAK */ + if (H5I_GENPROP_LST == H5I_get_type(plist_id)) { + if(H5Pclose_list(plist_id)<0) + HRETURN_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to close property list"); + } /* end if */ + else { + if (H5P_get_class (plist_id)<0) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + } + + /* When the reference count reaches zero the resources are freed */ + if (H5I_dec_ref(plist_id) < 0) + HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing property list"); + } /* end else */ FUNC_LEAVE (SUCCEED); } @@ -470,7 +504,7 @@ H5P_close(void *_plist) /* Some property lists may need to do special things */ switch (plist->cls) { - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: if (fa_list->driver_id>=0) { H5FD_fapl_free(fa_list->driver_id, fa_list->driver_info); H5I_dec_ref(fa_list->driver_id); @@ -479,16 +513,16 @@ H5P_close(void *_plist) } break; - case H5P_FILE_CREATE: + case H5P_FILE_CREATE_OLD: break; - case H5P_DATASET_CREATE: + case H5P_DATASET_CREATE_OLD: H5O_reset(H5O_FILL, &(dc_list->fill)); H5O_reset(H5O_EFL, &(dc_list->efl)); H5O_reset(H5O_PLINE, &(dc_list->pline)); break; - case H5P_MOUNT: + case H5P_MOUNT_OLD: break; default: @@ -519,10 +553,10 @@ H5P_close(void *_plist) * *------------------------------------------------------------------------- */ -H5P_class_t +hid_t H5Pget_class(hid_t plist_id) { - H5P_class_t ret_value = H5P_NO_CLASS; + hid_t ret_value = H5P_NO_CLASS; FUNC_ENTER(H5Pget_class, H5P_NO_CLASS); H5TRACE1("p","i",plist_id); @@ -548,13 +582,13 @@ H5Pget_class(hid_t plist_id) * *------------------------------------------------------------------------- */ -H5P_class_t +H5P_class_t_old H5P_get_class(hid_t plist_id) { H5I_type_t group; - H5P_class_t ret_value = H5P_NO_CLASS; + H5P_class_t_old ret_value = H5P_NO_CLASS; - FUNC_ENTER(H5P_get_class, H5P_NO_CLASS); + FUNC_ENTER(H5P_get_class, H5P_NO_CLASS_OLD); if ((group = H5I_get_type(plist_id)) < 0 || group >= H5I_TEMPLATE_MAX || @@ -563,7 +597,7 @@ H5P_get_class(hid_t plist_id) "not a property list"); } - ret_value = (H5P_class_t)(group - H5I_TEMPLATE_0); + ret_value = (H5P_class_t_old)(group - H5I_TEMPLATE_0); FUNC_LEAVE(ret_value); } @@ -833,7 +867,7 @@ H5Pcopy(hid_t plist_id) { const void *plist = NULL; void *new_plist = NULL; - H5P_class_t type; + H5P_class_t_old type; hid_t ret_value = FAIL; H5I_type_t group; @@ -900,7 +934,7 @@ H5Pcopy(hid_t plist_id) *------------------------------------------------------------------------- */ void * -H5P_copy (H5P_class_t type, const void *src) +H5P_copy (H5P_class_t_old type, const void *src) { size_t size; H5P_t *dst = NULL; @@ -912,19 +946,19 @@ H5P_copy (H5P_class_t type, const void *src) /* How big is the property list */ switch (type) { - case H5P_FILE_CREATE: + case H5P_FILE_CREATE_OLD: size = sizeof(H5F_create_t); break; - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: size = sizeof(H5F_access_t); break; - case H5P_DATASET_CREATE: + case H5P_DATASET_CREATE_OLD: size = sizeof(H5D_create_t); break; - case H5P_MOUNT: + case H5P_MOUNT_OLD: size = sizeof(H5F_mprop_t); break; @@ -947,10 +981,10 @@ H5P_copy (H5P_class_t type, const void *src) /* Deep-copy pointers */ switch (type) { - case H5P_FILE_CREATE: + case H5P_FILE_CREATE_OLD: break; - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: fa_dst = (H5F_access_t*)dst; if (fa_dst->driver_id>=0) { @@ -960,7 +994,7 @@ H5P_copy (H5P_class_t type, const void *src) } break; - case H5P_DATASET_CREATE: + case H5P_DATASET_CREATE_OLD: dc_src = (const H5D_create_t*)src; dc_dst = (H5D_create_t*)dst; @@ -984,7 +1018,7 @@ H5P_copy (H5P_class_t type, const void *src) } break; - case H5P_MOUNT: + case H5P_MOUNT_OLD: /* Nothing to do */ break; @@ -2290,7 +2324,7 @@ H5Pget_buffer(hid_t plist_id, void **tconv/*out*/, void **bkg/*out*/) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, 0, "not a dataset transfer property list"); /* Return values */ @@ -2348,7 +2382,7 @@ H5Pset_hyper_cache(hid_t plist_id, unsigned cache, unsigned limit) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Update property list */ @@ -2386,7 +2420,7 @@ H5Pget_hyper_cache(hid_t plist_id, unsigned *cache/*out*/, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Return values */ @@ -2431,7 +2465,7 @@ H5Pset_preserve(hid_t plist_id, hbool_t status) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Update property list */ @@ -2469,7 +2503,7 @@ H5Pget_preserve(hid_t plist_id) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); @@ -2790,7 +2824,7 @@ H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/, double *middle/*out*/, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Get the split ratios */ @@ -2842,7 +2876,7 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); if (left<0.0 || left>1.0 || middle<0.0 || middle>1.0 || right<0.0 || right>1.0) @@ -3147,7 +3181,7 @@ H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Update property list */ @@ -3189,7 +3223,7 @@ H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func/*out*/, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); if(alloc_func!=NULL) { @@ -3412,7 +3446,7 @@ H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); if (vector_size<1) @@ -3448,7 +3482,7 @@ H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size/*out*/) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Return values */ diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index fa67af4..61916f1 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -98,13 +98,13 @@ typedef struct { H5D_create_t dcreate; /* Dataset creation properties */ H5F_mprop_t mount; /* Mounting properties */ } u; - H5P_class_t cls; /* Property list class */ + H5P_class_t_old cls; /* Property list class */ } H5P_t; /* Private functions, not part of the publicly documented API */ __DLL__ herr_t H5P_init(void); -__DLL__ hid_t H5P_create(H5P_class_t type, H5P_t *plist); -__DLL__ void *H5P_copy(H5P_class_t type, const void *src); +__DLL__ hid_t H5P_create(H5P_class_t_old type, H5P_t *plist); +__DLL__ void *H5P_copy(H5P_class_t_old type, const void *src); __DLL__ herr_t H5P_close(void *plist); __DLL__ herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t size, void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, @@ -112,7 +112,7 @@ __DLL__ herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t siz H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); __DLL__ herr_t H5P_get(hid_t plist_id, const char *name, void *value); __DLL__ herr_t H5P_set(hid_t plist_id, const char *name, void *value); -__DLL__ H5P_class_t H5P_get_class(hid_t tid); +__DLL__ H5P_class_t_old H5P_get_class(hid_t tid); __DLL__ hid_t H5P_get_driver(hid_t plist_id); /* Private functions to "peek" at properties of a certain type */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index a4a6522..fec9801 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -37,15 +37,30 @@ typedef long off_t; /*__MWERKS__*/ /* Property list classes */ -typedef enum H5P_class_t { - H5P_NO_CLASS = -1, /*error return value */ - H5P_FILE_CREATE = 0, /*file creation properties */ - H5P_FILE_ACCESS = 1, /*file access properties */ - H5P_DATASET_CREATE = 2, /*dataset creation properties */ - H5P_DATASET_XFER = 3, /*data transfer properties */ - H5P_MOUNT = 4, /*file mounting properties */ - H5P_NCLASSES /*this must be last! */ -} H5P_class_t; +typedef enum H5P_class_t_old { + H5P_NO_CLASS_OLD = -1, /*error return value */ + H5P_FILE_CREATE_OLD = 0, /*file creation properties */ + H5P_FILE_ACCESS_OLD = 1, /*file access properties */ + H5P_DATASET_CREATE_OLD= 2, /*dataset creation properties */ + H5P_MOUNT_OLD = 3, /*file mounting properties */ + H5P_NCLASSES_OLD /*this must be last! */ +} H5P_class_t_old; + +/* This typedef should go in the v1.4 compat section when all the internal */ +/* property lists are switched to generic property lists - QAK */ +typedef hid_t H5P_class_t; /* Alias H5P_class_t to hid_t */ +/* hid_t aliases for old H5P_class_t enum values */ +/* These go away as each old-style property list is converted to a generic */ +/* property list -QAK */ +/* Also - merge/delete H5Pcreate and H5Pcreate_list */ +/* - merge/delete H5Pget_class and H5Pget_class_new */ +/* - merge/delete H5Pcopy and H5Pcopy_new */ +/* - merge/delete H5Pclose and H5Pclose_list */ +__DLLVAR__ hid_t H5P_NO_CLASS; +__DLLVAR__ hid_t H5P_FILE_CREATE; +__DLLVAR__ hid_t H5P_FILE_ACCESS; +__DLLVAR__ hid_t H5P_DATASET_CREATE; +__DLLVAR__ hid_t H5P_MOUNT; /* H5P_DATASET_XFER was the name from the beginning through 1.2. It was * changed to H5P_DATA_XFER on v1.3.0. Then it was changed back to @@ -86,7 +101,7 @@ extern "C" { #define H5P_FILE_ACCESS_HASH_SIZE 17 #define H5P_DATASET_CREATE_NEW (H5open(), H5P_CLS_DATASET_CREATE_g) #define H5P_DATASET_CREATE_HASH_SIZE 17 -#define H5P_DATASET_XFER_NEW (H5open(), H5P_CLS_DATASET_XFER_g) +#define H5P_DATASET_XFER (H5open(), H5P_CLS_DATASET_XFER_g) #define H5P_DATASET_XFER_HASH_SIZE 17 #define H5P_MOUNT_NEW (H5open(), H5P_CLS_MOUNT_g) #define H5P_MOUNT_HASH_SIZE 17 @@ -146,10 +161,10 @@ __DLL__ herr_t H5Premove(hid_t plist_id, const char *name); __DLL__ herr_t H5Punregister(hid_t pclass_id, const char *name); __DLL__ herr_t H5Pclose_list(hid_t plist_id); __DLL__ herr_t H5Pclose_class(hid_t plist_id); -__DLL__ hid_t H5Pcreate(H5P_class_t type); +__DLL__ hid_t H5Pcreate(hid_t type); __DLL__ herr_t H5Pclose(hid_t plist_id); __DLL__ hid_t H5Pcopy(hid_t plist_id); -__DLL__ H5P_class_t H5Pget_class(hid_t plist_id); +__DLL__ hid_t H5Pget_class(hid_t plist_id); __DLL__ herr_t H5Pget_version(hid_t plist_id, int *boot/*out*/, int *freelist/*out*/, int *stab/*out*/, int *shhdr/*out*/); diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index ee00e50..0fbb346 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -157,7 +157,7 @@ main (int argc, char *argv[]) if ((space = H5Screate_simple (2, dim, NULL))<0) goto error; /* Create xfer properties to preserve initialized data */ - if ((PRESERVE = H5Pcreate_list (H5P_DATASET_XFER_NEW))<0) goto error; + if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER))<0) goto error; if (H5Pset_preserve (PRESERVE, 1)<0) goto error; /* @@ -703,7 +703,7 @@ main (int argc, char *argv[]) /* * Release resources. */ - H5Pclose_list (PRESERVE); + H5Pclose (PRESERVE); H5Dclose (dataset); H5Fclose (file); diff --git a/test/dsets.c b/test/dsets.c index 40d5f90..6716e02 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -198,7 +198,7 @@ test_simple_io(hid_t file) /* Create a small conversion buffer to test strip mining */ tconv_buf = malloc (1000); - xfer = H5Pcreate_list (H5P_DATASET_XFER_NEW); + xfer = H5Pcreate (H5P_DATASET_XFER); assert (xfer>=0); if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error; @@ -226,7 +226,7 @@ test_simple_io(hid_t file) } } - i=H5Pclose_list (xfer); + i=H5Pclose (xfer); H5Dclose(dataset); free (tconv_buf); PASSED(); @@ -383,7 +383,7 @@ test_compression(hid_t file) * Create a small conversion buffer to test strip mining. We * might as well test all we can! */ - if ((xfer = H5Pcreate_list (H5P_DATASET_XFER_NEW))<0) goto error; + if ((xfer = H5Pcreate (H5P_DATASET_XFER))<0) goto error; tconv_buf = malloc (1000); if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error; @@ -637,7 +637,7 @@ test_compression(hid_t file) * Cleanup *---------------------------------------------------------------------- */ - if (H5Pclose_list (xfer)<0) goto error; + if (H5Pclose (xfer)<0) goto error; if (H5Pclose (dc)<0) goto error; if (H5Dclose(dataset)<0) goto error; free (tconv_buf); diff --git a/test/tarray.c b/test/tarray.c index fe816d5..4b0943c 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -1141,7 +1141,7 @@ test_array_vlen_atomic(void) CHECK(ret, FAIL, "H5Tclose"); /* Change to the custom memory allocation routines for reading VL data */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_array_alloc_custom,&mem_used,test_array_free_custom,&mem_used); @@ -1196,7 +1196,7 @@ test_array_vlen_atomic(void) CHECK(ret, FAIL, "H5Dvlen_reclaim"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close Datatype */ @@ -1395,7 +1395,7 @@ test_array_vlen_array(void) CHECK(ret, FAIL, "H5Tclose"); /* Change to the custom memory allocation routines for reading VL data */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_array_alloc_custom,&mem_used,test_array_free_custom,&mem_used); @@ -1452,7 +1452,7 @@ test_array_vlen_array(void) CHECK(ret, FAIL, "H5Dvlen_reclaim"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close Datatype */ diff --git a/test/tselect.c b/test/tselect.c index 22743da..d0d889d 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -2227,8 +2227,8 @@ test_select_hyper_union(void) dataset=H5Dcreate(fid1,"Dataset4",H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT); CHECK(dataset, FAIL, "H5Dcreate"); - xfer = H5Pcreate_list (H5P_DATASET_XFER_NEW); - CHECK(xfer, FAIL, "H5Pcreate_list"); + xfer = H5Pcreate (H5P_DATASET_XFER); + CHECK(xfer, FAIL, "H5Pcreate"); ret = H5Pset_hyper_cache(xfer,0,1); CHECK(ret, FAIL, "H5Pset_hyper_cache"); @@ -2258,7 +2258,7 @@ test_select_hyper_union(void) CHECK(ret, FAIL, "H5Dread"); /* Close transfer property list */ - ret = H5Pclose_list(xfer); + ret = H5Pclose(xfer); CHECK(ret, FAIL, "H5Pclose"); /* Compare data read with data written out */ @@ -3170,7 +3170,7 @@ test_select(void) MESSAGE(5, ("Testing Selections\n")); /* Create a dataset transfer property list */ - plist_id=H5Pcreate_list(H5P_DATASET_XFER_NEW); + plist_id=H5Pcreate(H5P_DATASET_XFER); CHECK(plist_id, FAIL, "H5Pcreate"); /* test I/O with a very small buffer for reads */ @@ -3231,7 +3231,7 @@ test_select(void) CHECK(ret, FAIL, "H5Pclose"); /* Close dataset transfer property list */ - ret=H5Pclose_list(plist_id); + ret=H5Pclose(plist_id); CHECK(ret, FAIL, "H5Pclose"); } /* test_select() */ diff --git a/test/tvlstr.c b/test/tvlstr.c index 40c3880..2a8ecbc 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -154,7 +154,7 @@ test_vlstrings_basic(void) CHECK(ret, FAIL, "H5Dwrite"); /* Change to the custom memory allocation routines for reading VL string */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_vlstr_alloc_custom,&mem_used,test_vlstr_free_custom,&mem_used); @@ -212,7 +212,7 @@ test_vlstrings_basic(void) CHECK(ret, FAIL, "H5Sclose"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close file */ diff --git a/test/tvltypes.c b/test/tvltypes.c index 3383818..8e59bd2 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -149,7 +149,7 @@ test_vltypes_vlen_atomic(void) CHECK(ret, FAIL, "H5Dwrite"); /* Change to the custom memory allocation routines for reading VL data */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_vltypes_alloc_custom,&mem_used,test_vltypes_free_custom,&mem_used); @@ -210,7 +210,7 @@ test_vltypes_vlen_atomic(void) CHECK(ret, FAIL, "H5Sclose"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close file */ @@ -289,7 +289,7 @@ test_vltypes_vlen_compound(void) CHECK(ret, FAIL, "H5Dwrite"); /* Change to the custom memory allocation routines for reading VL data */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_vltypes_alloc_custom,&mem_used,test_vltypes_free_custom,&mem_used); @@ -359,7 +359,7 @@ test_vltypes_vlen_compound(void) CHECK(ret, FAIL, "H5Sclose"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close file */ @@ -441,7 +441,7 @@ test_vltypes_compound_vlen_atomic(void) CHECK(ret, FAIL, "H5Dwrite"); /* Change to the custom memory allocation routines for reading VL data */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_vltypes_alloc_custom,&mem_used,test_vltypes_free_custom,&mem_used); @@ -516,7 +516,7 @@ test_vltypes_compound_vlen_atomic(void) CHECK(ret, FAIL, "H5Sclose"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close file */ @@ -658,7 +658,7 @@ test_vltypes_vlen_vlen_atomic(void) CHECK(dataset, FAIL, "H5Dopen"); /* Change to the custom memory allocation routines for reading VL data */ - xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW); + xfer_pid=H5Pcreate(H5P_DATASET_XFER); CHECK(xfer_pid, FAIL, "H5Pcreate"); ret=H5Pset_vlen_mem_manager(xfer_pid,test_vltypes_alloc_custom,&mem_used,test_vltypes_free_custom,&mem_used); @@ -732,7 +732,7 @@ test_vltypes_vlen_vlen_atomic(void) CHECK(ret, FAIL, "H5Sclose"); /* Close dataset transfer property list */ - ret = H5Pclose_list(xfer_pid); + ret = H5Pclose(xfer_pid); CHECK(ret, FAIL, "H5Pclose"); /* Close file */ diff --git a/tools/lib/talign.c b/tools/lib/talign.c index 91cec99..5c4f88d 100644 --- a/tools/lib/talign.c +++ b/tools/lib/talign.c @@ -91,7 +91,7 @@ int main(void) H5Tinsert(cmp3, "Not Ok", 0, array_dt); H5Tclose(array_dt); - plist = H5Pcreate_list(H5P_DATASET_XFER_NEW); + plist = H5Pcreate(H5P_DATASET_XFER); H5Pset_preserve(plist, 1); /* @@ -166,7 +166,7 @@ int main(void) H5Tclose(cmp1); H5Tclose(cmp2); H5Tclose(cmp3); - H5Pclose_list(plist); + H5Pclose(plist); H5Fclose(fil); unlink(fname); fflush(stdout); -- cgit v0.12