Skip to content

Commit

Permalink
Add some "cold" marks
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 14, 2021
1 parent edd27e1 commit 58d82ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions error.c
Expand Up @@ -972,7 +972,7 @@ rb_builtin_class_name(VALUE x)
return etype;
}

NORETURN(static void unexpected_type(VALUE, int, int));
COLDFUNC NORETURN(static void unexpected_type(VALUE, int, int));
#define UNDEF_LEAKED "undef leaked to the Ruby space"

static void
Expand Down Expand Up @@ -1001,7 +1001,7 @@ rb_check_type(VALUE x, int t)
{
int xt;

if (x == Qundef) {
if (RB_UNLIKELY(x == Qundef)) {
rb_bug(UNDEF_LEAKED);
}

Expand All @@ -1022,7 +1022,7 @@ rb_check_type(VALUE x, int t)
void
rb_unexpected_type(VALUE x, int t)
{
if (x == Qundef) {
if (RB_UNLIKELY(x == Qundef)) {
rb_bug(UNDEF_LEAKED);
}

Expand Down

0 comments on commit 58d82ea

Please sign in to comment.