summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-23 20:25:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-23 20:25:25 (GMT)
commit63eb5b9ebbf4b9d63ee9173fec73027a0da1e33e (patch)
treef0947a1f2d2d60d55935f092cbb7071b4e62b301 /c++/src
parent3183d38231c3d2de3dd9e18abac1e753ca727013 (diff)
downloadhdf5-63eb5b9ebbf4b9d63ee9173fec73027a0da1e33e.zip
hdf5-63eb5b9ebbf4b9d63ee9173fec73027a0da1e33e.tar.gz
hdf5-63eb5b9ebbf4b9d63ee9173fec73027a0da1e33e.tar.bz2
[svn-r14104] Description:
Pursue calls to H5Gcreate() relentlessly and ruthlessly exterminate them, leaving only a few tame specimens in text files and comments. ;-) Tested on: Mac OS X/32 10.4.10 (amazon) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew)
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5CommonFG.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 139a105..ee4303c 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -67,15 +67,29 @@ namespace H5 {
//--------------------------------------------------------------------------
Group CommonFG::createGroup( const char* name, size_t size_hint ) const
{
- // Call C routine H5Gcreate to create the named group, giving the
+ // Create group creation property list for size_hint
+ hid_t gcpl_id = H5Pcreate(H5P_GROUP_CREATE);
+
+ // If the creation of the property list failed, throw an exception
+ if( gcpl_id < 0 )
+ throwException("createGroup", "H5Pcreate failed");
+
+ // Set the local heap size hint
+ if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
+ H5Pclose(gcpl_id);
+ throwException("createGroup", "H5Pset_local_heap_size failed");
+ }
+
+ // Call C routine H5Gcreate2 to create the named group, giving the
// location id which can be a file id or a group id
- hid_t group_id = H5Gcreate( getLocId(), name, size_hint );
+ hid_t group_id = H5Gcreate2( getLocId(), name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT );
+
+ // Close the group creation property list
+ H5Pclose(gcpl_id);
// If the creation of the group failed, throw an exception
if( group_id < 0 )
- {
- throwException("createGroup", "H5Gcreate failed");
- }
+ throwException("createGroup", "H5Gcreate2 failed");
// No failure, create and return the Group object
Group group( group_id );