diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2020-11-17 18:06:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 18:06:39 (GMT) |
commit | a50d211755cb272b2e468144e7d892a4c90813c4 (patch) | |
tree | 5ef471321caab6a2f9d14eef0f9cab462c8d73f5 /.github | |
parent | 0db2d6c21211cc78dbde8e9b1a1588902aec152c (diff) | |
download | hdf5-a50d211755cb272b2e468144e7d892a4c90813c4.zip hdf5-a50d211755cb272b2e468144e7d892a4c90813c4.tar.gz hdf5-a50d211755cb272b2e468144e7d892a4c90813c4.tar.bz2 |
Switch ID code to use a hash table instead of a skip list (#52)
* Brings hash table ID code over from Bitbucket branch
* Includes reformatting via clang.
* Excludes uthash.h from reformatting.
* Still has the failing test issue in tid.c. This should only be a
problem if a custom ID type is used and its free function deletes
other IDs.
* Fixes munged H5_GCC_DIAG_ON/OFF macros in H5I.c
The H5_GCC_DIAG_ON/OFF macros used to turn off fallthrough warnings
in uthash.h (external code) were munged when formatting with clang
due to their lack of quotes.
e.g.;
H5_GCC_DIAG_OFF(implicit-fallthrough)
was munged to:
H5_GCC_DIAG_OFF(implicit - fallthrough)
which compiles, but is useless. So, with quotes, this is now:
H5_GCC_DIAG_OFF("implicit-fallthrough")
which survives reformatting with clang.
* Fixes issues with user callbacks in the ID hash tables
The skip lists (previously) used to handle IDs use a mark-and-sweep
scheme to deal with user-defined ID delete callbacks which themselves delete
other IDs in the list. The uthash hash table implementation used to manage
the IDs in this feature branch does not have this ability.
This commit restores the skip lists for non-library ID types in lieu of
significantly modifying the uthash code. The hash tables are used to
manage the library IDs as those do not delete other IDs when they are
closed.
* Adds uthash.h to MANIFEST
* Removes implicit-fallthrough diagnostic disable
Removing -Wimplicit-fallthrough=5 means that the uthash code
no longer raises warnings so the H5_GCC_DIAG_OFF/ON macros
that disabled those warnings have been removed from H5I.c.
* Adds a test to ensure you can delete IDs in the H5Iiterate() callback
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/clang-format-check.yml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 6bf522c..84bc9d8 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -14,4 +14,4 @@ jobs: extensions: 'c,h,cpp,hpp' clangFormatVersion: 10 style: file - exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' + exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h ./src/uthash.h' |