diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-08-12 10:42:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-08-13 13:29:15 +0900 |
commit | 611da9faef76777e57718cf5b0286b965879479c (patch) | |
tree | 6fdb01fc515dff70e981c705a4b4078f7d13fdd6 | |
parent | 573eef7c897ff938539270e605445da13093d664 (diff) | |
download | ruby-611da9faef76777e57718cf5b0286b965879479c.tar.gz |
Mark `rb_unexpected_type` as "cold" [Bug #18062]
So that it will not interfere the fast path in `Check_Type`.
-rw-r--r-- | include/ruby/internal/error.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/error.h b/include/ruby/internal/error.h index 7e9d5c4167..bd5c4d2ea1 100644 --- a/include/ruby/internal/error.h +++ b/include/ruby/internal/error.h @@ -61,7 +61,7 @@ NORETURN(void rb_syserr_fail_str(int, VALUE)); NORETURN(void rb_mod_syserr_fail(VALUE, int, const char*)); NORETURN(void rb_mod_syserr_fail_str(VALUE, int, VALUE)); NORETURN(void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*)); -NORETURN(void rb_unexpected_type(VALUE,int)); +COLDFUNC NORETURN(void rb_unexpected_type(VALUE,int)); VALUE *rb_ruby_verbose_ptr(void); VALUE *rb_ruby_debug_ptr(void); |