mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
f46b57e22e
Added kh_rebuild_##name() helper function that consolidates the complete "save-allocate-rehash-cleanup" pattern shared between kh_resize and kh_put_small functions. The helper intelligently handles both scenarios: - Small table conversion: iterates by size - Hash table resize: iterates by buckets with flag checks This eliminates approximately 25 lines of duplicated code across the two functions while maintaining identical functionality. Co-authored-by: Claude <noreply@anthropic.com>