diff options
author | yui-knk <spiketeika@gmail.com> | 2023-05-24 17:24:41 +0900 |
---|---|---|
committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2023-05-24 20:54:48 +0900 |
commit | 5f65e8c5d5b625462121e01cc15e88be5729b60c (patch) | |
tree | c3ad3c84e88ed3e637e8971ed946089e0a9b0147 /node.c | |
parent | d8da563f9e720271707698bb8764a0f147244887 (diff) |
Rename `rb_node_name` to the original name
98637d421dbe8bcf86cc2effae5e26bb96a6a4da changes the name of
the function. However this function is exported as global,
then change the name to origin one for keeping compatibility.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7852
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -29,7 +29,7 @@ #define A_LIT(lit) AR(rb_dump_literal(lit)) #define A_NODE_HEADER(node, term) \ rb_str_catf(buf, "@ %s (id: %d, line: %d, location: (%d,%d)-(%d,%d))%s"term, \ - rb_node_name(nd_type(node)), nd_node_id(node), nd_line(node), \ + ruby_node_name(nd_type(node)), nd_node_id(node), nd_line(node), \ nd_first_lineno(node), nd_first_column(node), \ nd_last_lineno(node), nd_last_column(node), \ (node->flags & NODE_FL_NEWLINE ? "*" : "")) @@ -1107,7 +1107,7 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node) break; } - rb_bug("dump_node: unknown node: %s", rb_node_name(nd_type(node))); + rb_bug("dump_node: unknown node: %s", ruby_node_name(nd_type(node))); } VALUE @@ -1145,7 +1145,7 @@ rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2) } const char * -rb_node_name(int node) +ruby_node_name(int node) { switch (node) { #include "node_name.inc" @@ -1295,7 +1295,7 @@ rb_ast_node_type_change(NODE *n, enum node_type type) enum node_type old_type = nd_type(n); if (nodetype_markable_p(old_type) != nodetype_markable_p(type)) { rb_bug("node type changed: %s -> %s", - rb_node_name(old_type), rb_node_name(type)); + ruby_node_name(old_type), ruby_node_name(type)); } } @@ -1390,7 +1390,7 @@ mark_ast_value(void *ctx, NODE * node) rb_gc_mark_movable(node->nd_rval); break; default: - rb_bug("unreachable node %s", rb_node_name(nd_type(node))); + rb_bug("unreachable node %s", ruby_node_name(nd_type(node))); } } |