Files
mruby-mruby/include/mruby
Yukihiro "Matz" Matsumoto 633544e087 khash: add flag operation helpers to eliminate bit manipulation duplication
Added two helper functions to encapsulate repeated flag manipulation patterns:
- kh_mark_occupied_##name(): clears both empty and deleted bits
- kh_mark_deleted_##name(): sets the deleted bit

Replaced 3 instances of manual bit manipulation with calls to these helpers:
- ed_flags[del_k/4] &= ~__m_del[del_k%4] → kh_mark_occupied_##name(h, del_k)
- ed_flags[k/4] &= ~__m_empty[k%4] → kh_mark_occupied_##name(h, k)
- ed_flags[x/4] |= __m_del[x%4] → kh_mark_deleted_##name(h, x)

This eliminates error-prone bit operations, improves readability, and makes
the flag state transitions self-documenting.

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