Files
mruby-mruby/include/mruby
Yukihiro "Matz" Matsumoto 8bcd0d247e khash: add size calculation helper and refactor for better organization
Added kh_data_size_##name() helper function to eliminate duplicated size
calculation patterns throughout the khash implementation. This single
universal helper calculates data size for N elements and replaces all
manual sizeof calculations.

Key changes:
- Add kh_data_size_##name(khint_t count) helper in KHASH_DECLARE
- Replace manual calculations in kh_flags, kh_alloc_small, kh_alloc
- Replace complex size calculations in kh_replace function
- Use specific patterns: small tables use KHASH_SMALL_THRESHOLD,
  hash tables add n_buckets/4 for flag space

This refactoring eliminates 6 instances of duplicated size calculation
code while maintaining identical functionality and performance.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-14 10:53:05 +09:00
..
2024-06-27 22:46:13 +02:00
2025-03-07 17:17:50 +09:00
2023-05-03 22:12:59 +10:00
2024-09-10 21:07:43 +09:00
2024-12-01 19:16:54 +09:00
2019-08-18 20:12:44 +09:00
2025-06-25 10:46:23 +10:00