mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make prefix static
This commit is contained in:
parent
ff2d99406d
commit
11e21f1982
1 changed files with 3 additions and 3 deletions
|
@ -6753,10 +6753,10 @@ static const char *
|
|||
iseq_builtin_function_name(ID mid)
|
||||
{
|
||||
const char *name = rb_id2name(mid);
|
||||
const char prefix[] = "__builtin_";
|
||||
const size_t prefix_len = strlen(prefix);
|
||||
static const char prefix[] = "__builtin_";
|
||||
const size_t prefix_len = sizeof(prefix) - 1;
|
||||
|
||||
if (UNLIKELY(strncmp("__builtin_", name, prefix_len) == 0)) {
|
||||
if (UNLIKELY(strncmp(prefix, name, prefix_len) == 0)) {
|
||||
return &name[prefix_len];
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue