Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove atom hash table power-of-2 ifdefs #434

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

derobins
Copy link
Member

The atom code enforces the hash table size being a power of two, yet ifdefs for the case where the hash size can be any size remain.

This change removes the ifdefs

The atom code enforces the hash table size being a power of two,
yet ifdefs for the case where the hash size can be any size remain.

This change removes the ifdefs
@derobins derobins added Component - C Library Core C library issues Type - Improvement Improvements that don't add a new feature or functionality Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. labels Sep 13, 2023
if (hash_size & (hash_size - 1))
HGOTO_ERROR(DFE_ARGS, FAIL);
#endif /* HASH_SIZE_POWER_2 */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original test allowed zero to be a valid size, which is probably not desired

@derobins derobins merged commit b18caf7 into HDFGroup:master Sep 13, 2023
44 checks passed
@derobins derobins deleted the atom_hash_power_2 branch March 3, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. Type - Improvement Improvements that don't add a new feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants