mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Rename rb_node_name
to the original name
98637d421d
changes the name of
the function. However this function is exported as global,
then change the name to origin one for keeping compatibility.
This commit is contained in:
parent
d8da563f9e
commit
5f65e8c5d5
Notes:
git
2023-05-24 11:55:17 +00:00
6 changed files with 16 additions and 16 deletions
10
node.c
10
node.c
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue