Skip to content
Permalink
Browse files

Make prefix static

  • Loading branch information...
nobu committed Nov 8, 2019
1 parent ff2d994 commit 11e21f1982cbe41860b3f6755505ce063b74fc33
Showing with 3 additions and 3 deletions.
  1. +3 −3 compile.c
@@ -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 {

0 comments on commit 11e21f1

Please sign in to comment.
You can’t perform that action at this time.