mruby-pack: rename get_format_info to pack_format_info

Avoid static function name collision with mruby-sprintf for future
amalgamation support.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-12-23 11:02:34 +09:00
parent 768a1f7752
commit 587561100e
+2 -2
View File
@@ -298,7 +298,7 @@ typedef struct {
} format_info_t;
/* Format character lookup function */
static inline format_info_t get_format_info(unsigned char c) {
static inline format_info_t pack_format_info(unsigned char c) {
switch (c) {
case 'A': return (format_info_t){PACK_DIR_STR, PACK_TYPE_STRING, 0, PACK_FLAG_WIDTH | PACK_FLAG_COUNT2};
case 'a': return (format_info_t){PACK_DIR_STR, PACK_TYPE_STRING, 0, PACK_FLAG_WIDTH | PACK_FLAG_COUNT2 | PACK_FLAG_a};
@@ -1698,7 +1698,7 @@ read_tmpl(mrb_state *mrb, struct tmpl *tmpl, enum pack_type *typep, mrb_int *siz
default:
/* Use O(1) lookup table for standard format characters */
if (t >= 0 && t < 256) {
format_info_t info_val = get_format_info((unsigned char)t);
format_info_t info_val = pack_format_info((unsigned char)t);
const format_info_t *info = &info_val;
if (info->dir != PACK_DIR_NONE) {
/* Valid format character found in lookup table */