summaryrefslogtreecommitdiffstats
path: root/src/H5Idbg.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-05-11 02:30:58 (GMT)
committerGitHub <noreply@github.com>2021-05-11 02:30:58 (GMT)
commit53cfafff061071dca0d74617629c66350f66d6cc (patch)
tree7fa76dff874cf0de04b67081f4bd44a993f1ce1c /src/H5Idbg.c
parent6ff6504b1808bd0bb0b6dc1ba97b683c7abfa8e1 (diff)
downloadhdf5-53cfafff061071dca0d74617629c66350f66d6cc.zip
hdf5-53cfafff061071dca0d74617629c66350f66d6cc.tar.gz
hdf5-53cfafff061071dca0d74617629c66350f66d6cc.tar.bz2
Brings hash table IDs to 1.12 from develop (#638)
* Brings hash table IDs from develop * Fixes free callback in tid.c
Diffstat (limited to 'src/H5Idbg.c')
-rw-r--r--src/H5Idbg.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/H5Idbg.c b/src/H5Idbg.c
index f0314b5..71937e8 100644
--- a/src/H5Idbg.c
+++ b/src/H5Idbg.c
@@ -30,7 +30,6 @@
#include "H5Gprivate.h" /* Groups */
#include "H5Ipkg.h" /* IDs */
#include "H5RSprivate.h" /* Reference-counted strings */
-#include "H5SLprivate.h" /* Skip Lists */
#include "H5Tprivate.h" /* Datatypes */
#include "H5VLprivate.h" /* Virtual Object Layer */
@@ -76,16 +75,17 @@ static int H5I__id_dump_cb(void *_item, void *_key, void *_udata);
static int
H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
{
- H5I_id_info_t *info = (H5I_id_info_t *)_item; /* Pointer to the ID node */
- H5I_type_t type = *(H5I_type_t *)_udata; /* User data */
- H5G_name_t * path = NULL; /* Path to file object */
- const void * object = NULL; /* Pointer to VOL connector object */
+ H5I_id_info_t * info = (H5I_id_info_t *)_item; /* Pointer to the ID node */
+ H5I_type_t type = *(H5I_type_t *)_udata; /* User data */
+ const H5G_name_t *path = NULL; /* Path to file object */
+ const void * object = NULL; /* Pointer to VOL connector object */
FUNC_ENTER_STATIC_NOERR
HDfprintf(stderr, " id = %" PRIdHID "\n", info->id);
HDfprintf(stderr, " count = %u\n", info->count);
HDfprintf(stderr, " obj = 0x%8p\n", info->object);
+ HDfprintf(stderr, " marked = %d\n", info->marked);
/* Get the group location, so we get get the name */
switch (type) {
@@ -172,6 +172,9 @@ H5I_dump_ids_for_type(H5I_type_t type)
if (type_info) {
+ H5I_id_info_t *item = NULL;
+ H5I_id_info_t *tmp = NULL;
+
/* Header */
HDfprintf(stderr, " init_count = %u\n", type_info->init_count);
HDfprintf(stderr, " reserved = %u\n", type_info->cls->reserved);
@@ -181,7 +184,17 @@ H5I_dump_ids_for_type(H5I_type_t type)
/* List */
if (type_info->id_count > 0) {
HDfprintf(stderr, " List:\n");
- H5SL_iterate(type_info->ids, H5I__id_dump_cb, &type);
+ /* Normally we care about the callback's return value
+ * (H5I_ITER_CONT, etc.), but this is an iteration over all
+ * the IDs so we don't care.
+ *
+ * XXX: Update this to emit an error message on errors?
+ */
+ HDfprintf(stderr, " (HASH TABLE)\n");
+ HASH_ITER(hh, type_info->hash_table, item, tmp)
+ {
+ H5I__id_dump_cb((void *)item, NULL, (void *)&type);
+ }
}
}
else