mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
c9583bfd4b
Add helper functions to simplify string representation creation in cons format: - new_str_rep(p, str, len): creates cons(length, string_ptr) - new_str_tok(p): creates string representation from current token - new_str_empty(p): creates empty string representation This reduces code duplication and improves readability by replacing verbose patterns like cons(int_to_node(toklen(p)), (node*)strndup(...)) with cleaner helper function calls. Co-authored-by: Claude <noreply@anthropic.com>