mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
e907995dcd
Replace the custom kset hash table implementation with the optimized khash.h while maintaining identical functionality and memory footprint. Changes: - Replace custom kset_t struct with kh_set_val_t typedef - Use KHASH_DECLARE/DEFINE macros for type-safe hash operations - Add compatibility layer to preserve existing kset API - Embed khash struct directly in RSet (same 16-byte footprint) - Remove duplicate string.h include (provided by khash.h) Benefits: - Unified hash implementation across mruby core - Eliminated ~200 lines of duplicate hash table code - Automatic benefits from future khash optimizations - Reduced maintenance burden with single hash implementation - Identical performance and memory characteristics The RSet structure maintains the same size through embedded khash struct, and all Set class functionality remains unchanged. Co-authored-by: Claude <noreply@anthropic.com>