Remove hbool_t from the public API (#5802)

* Remove hbool_t from the public API

This was previously removed from the source code, but the API calls
retained hbool_t in the public API calls. This commit removes
hbool_t from the public APIs.

hbool_t is retained as a typedef for bool in H5public.h so existing
code doesn't break.
This commit is contained in:
Dana Robinson
2025-09-15 17:36:22 -05:00
committed by GitHub
parent 336318301c
commit 3b47e2d227
70 changed files with 254 additions and 241 deletions
+6 -6
View File
@@ -5323,7 +5323,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void FileAccPropList::setCore (size_t increment, hbool_t
normal'>void FileAccPropList::setCore (size_t increment, bool
backing_store)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
@@ -5360,7 +5360,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void FileAccPropList::getCore (size_t&amp; increment, hbool_t&amp;
normal'>void FileAccPropList::getCore (size_t&amp; increment, bool&amp;
backing_store)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
@@ -9226,7 +9226,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void CommonFG::getObjinfo( const char* name, hbool_t follow_link,
normal'>void CommonFG::getObjinfo( const char* name, bool follow_link,
H5G_stat_t&amp; statbuf )</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
@@ -9257,7 +9257,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void CommonFG::getObjinfo( const H5std_string&amp; name, hbool_t
normal'>void CommonFG::getObjinfo( const H5std_string&amp; name, bool
follow_link, H5G_stat_t&amp; statbuf )</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
@@ -15330,7 +15330,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t
strategy, hbool_t persist, hsize_t threshold)</p>
strategy, bool persist, hsize_t threshold)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
@@ -15368,7 +15368,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void
FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t&amp; strategy,
hbool_t&amp; persist, hsize_t&amp; threshold)</p>
bool&amp; persist, hsize_t&amp; threshold)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+1 -1
View File
@@ -164,7 +164,7 @@ DSetMemXferPropList::getBuffer(void **tconv, void **bkg) const
void
DSetMemXferPropList::setPreserve(bool status) const
{
herr_t ret_value = H5Pset_preserve(id, static_cast<hbool_t>(status));
herr_t ret_value = H5Pset_preserve(id, static_cast<bool>(status));
if (ret_value < 0) {
throw PropListIException("DSetMemXferPropList::setPreserve", "H5Pset_preserve failed");
}
+4 -4
View File
@@ -207,7 +207,7 @@ FileAccPropList::getFamilyOffset() const
/// refer to the H5Pset_fapl_core API in the HDF5 C Reference Manual.
//--------------------------------------------------------------------------
void
FileAccPropList::setCore(size_t increment, hbool_t backing_store) const
FileAccPropList::setCore(size_t increment, bool backing_store) const
{
herr_t ret_value = H5Pset_fapl_core(id, increment, backing_store);
if (ret_value < 0) {
@@ -224,7 +224,7 @@ FileAccPropList::setCore(size_t increment, hbool_t backing_store) const
///\exception H5::PropListIException
//--------------------------------------------------------------------------
void
FileAccPropList::getCore(size_t &increment, hbool_t &backing_store) const
FileAccPropList::getCore(size_t &increment, bool &backing_store) const
{
herr_t ret_value = H5Pget_fapl_core(id, &increment, &backing_store);
if (ret_value < 0) {
@@ -667,7 +667,7 @@ FileAccPropList::getGcReferences() const
/// the HDF5 C Reference Manual.
//--------------------------------------------------------------------------
void
FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const
FileAccPropList::setFileLocking(bool use_file_locking, bool ignore_when_disabled) const
{
herr_t ret_value = H5Pset_file_locking(id, use_file_locking, ignore_when_disabled);
@@ -689,7 +689,7 @@ FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_di
/// the HDF5 C Reference Manual.
//--------------------------------------------------------------------------
void
FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_disabled) const
FileAccPropList::getFileLocking(bool &use_file_locking, bool &ignore_when_disabled) const
{
herr_t ret_value = H5Pget_file_locking(id, &use_file_locking, &ignore_when_disabled);
+4 -4
View File
@@ -49,10 +49,10 @@ class H5CPP_DLL FileAccPropList : public PropList {
// Modifies this file access property list to use the H5FD_CORE
// driver.
void setCore(size_t increment, hbool_t backing_store) const;
void setCore(size_t increment, bool backing_store) const;
// Queries H5FD_CORE driver properties.
void getCore(size_t &increment, hbool_t &backing_store) const;
void getCore(size_t &increment, bool &backing_store) const;
// Sets this file access properties list to the family driver.
void setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) const;
@@ -122,10 +122,10 @@ class H5CPP_DLL FileAccPropList : public PropList {
unsigned getGcReferences() const;
// Sets file locking parameters.
void setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const;
void setFileLocking(bool use_file_locking, bool ignore_when_disabled) const;
// Gets file locking parameters.
void getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_disabled) const;
void getFileLocking(bool &use_file_locking, bool &ignore_when_disabled) const;
// Sets bounds on versions of library format to be used when creating
// or writing objects.
+2 -3
View File
@@ -292,8 +292,7 @@ FileCreatPropList::getIstorek() const
/// API in the HDF5 C Reference Manual.
//--------------------------------------------------------------------------
void
FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist,
hsize_t threshold) const
FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, bool persist, hsize_t threshold) const
{
herr_t ret_value = H5Pset_file_space_strategy(id, strategy, persist, threshold);
if (ret_value < 0) {
@@ -312,7 +311,7 @@ FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t
///\exception H5::PropListIException
//--------------------------------------------------------------------------
void
FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t &persist,
FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, bool &persist,
hsize_t &threshold) const
{
herr_t ret_value = H5Pget_file_space_strategy(id, &strategy, &persist, &threshold);
+2 -2
View File
@@ -63,10 +63,10 @@ class H5CPP_DLL FileCreatPropList : public PropList {
// Sets the strategy and the threshold value that the library will
// will employ in managing file space.
void setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const;
void setFileSpaceStrategy(H5F_fspace_strategy_t strategy, bool persist, hsize_t threshold) const;
// Returns the strategy that the library uses in managing file space.
void getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t &persist, hsize_t &threshold) const;
void getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, bool &persist, hsize_t &threshold) const;
// Sets the file space page size for paged aggregation.
void setFileSpacePagesize(hsize_t fsp_psize) const;
+2 -2
View File
@@ -1683,7 +1683,7 @@ H5Location::getObjinfo(const H5std_string &grp_name, H5_index_t idx_type, H5_ite
// 2000
//--------------------------------------------------------------------------
void
H5Location::getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbuf) const
H5Location::getObjinfo(const char *name, bool follow_link, H5G_stat_t &statbuf) const
{
herr_t ret_value = H5Gget_objinfo(getId(), name, follow_link, &statbuf);
if (ret_value < 0)
@@ -1697,7 +1697,7 @@ H5Location::getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbu
/// \c H5std_string for \a name.
//--------------------------------------------------------------------------
void
H5Location::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) const
H5Location::getObjinfo(const H5std_string &name, bool follow_link, H5G_stat_t &statbuf) const
{
getObjinfo(name.c_str(), follow_link, statbuf);
}
+2 -2
View File
@@ -201,8 +201,8 @@ class H5CPP_DLL H5Location : public IdComponent {
// Returns information about an HDF5 object, given by its name,
// at this location. - Deprecated
void getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbuf) const;
void getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) const;
void getObjinfo(const char *name, bool follow_link, H5G_stat_t &statbuf) const;
void getObjinfo(const H5std_string &name, bool follow_link, H5G_stat_t &statbuf) const;
void getObjinfo(const char *name, H5G_stat_t &statbuf) const;
void getObjinfo(const H5std_string &name, H5G_stat_t &statbuf) const;
+2 -2
View File
@@ -842,7 +842,7 @@ test_file_info()
SUBTEST("File general information");
hsize_t out_threshold = 0; // Free space section threshold to get
hbool_t out_persist = false; // Persist free-space read
bool out_persist = false; // Persist free-space read
// File space handling strategy
H5F_fspace_strategy_t out_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
@@ -884,7 +884,7 @@ test_file_info()
fcpl.setIstorek(F2_ISTORE);
hsize_t threshold = 5; // Free space section threshold to set
hbool_t persist = true; // Persist free-space to set
bool persist = true; // Persist free-space to set
H5F_fspace_strategy_t strategy = H5F_FSPACE_STRATEGY_PAGE;
fcpl.setFileSpaceStrategy(strategy, persist, threshold);
+6 -6
View File
@@ -57,7 +57,7 @@ static const char *FILENAME[] = {"link0", "link1.h5", "link2.h5", "visit", NULL}
*-------------------------------------------------------------------------
*/
static void
test_basic_links(hid_t fapl_id, hbool_t new_format)
test_basic_links(hid_t fapl_id, bool new_format)
{
hsize_t size[1] = {1};
char filename[NAME_BUF_SIZE];
@@ -167,7 +167,7 @@ test_basic_links(hid_t fapl_id, hbool_t new_format)
const H5std_string GROUP1NAME("First_group");
const H5std_string GROUP2NAME("Second_group");
static void
test_lcpl(hid_t fapl_id, hbool_t new_format)
test_lcpl(hid_t fapl_id, bool new_format)
{
H5L_info2_t linfo;
char filename[1024];
@@ -249,7 +249,7 @@ test_lcpl(hid_t fapl_id, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static void
test_move(hid_t fapl_id, hbool_t new_format)
test_move(hid_t fapl_id, bool new_format)
{
char filename[1024];
@@ -394,7 +394,7 @@ test_move(hid_t fapl_id, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static void
test_copy(hid_t fapl_id, hbool_t new_format)
test_copy(hid_t fapl_id, bool new_format)
{
char filename[1024];
@@ -532,7 +532,7 @@ test_copy(hid_t fapl_id, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static void
test_num_links(hid_t fapl_id, hbool_t new_format)
test_num_links(hid_t fapl_id, bool new_format)
{
char filename[NAME_BUF_SIZE];
@@ -615,7 +615,7 @@ visit_obj_cb(H5Object &obj, const H5std_string name, const H5O_info2_t *oinfo, v
*-------------------------------------------------------------------------
*/
static void
test_visit(hid_t fapl_id, hbool_t new_format)
test_visit(hid_t fapl_id, bool new_format)
{
hsize_t dims[2];
hsize_t cdims[2];