mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Always inline rb_to_integer to prevent a method call penalty
for integer types Close https://github.com/ruby/ruby/pull/2001 Co-Authored-By: methodmissing <lourens@methodmissing.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
728afecc55
commit
38caab29bc
1 changed files with 2 additions and 1 deletions
3
object.c
3
object.c
|
@ -3055,7 +3055,8 @@ rb_check_convert_type_with_id(VALUE val, int type, const char *tname, ID method)
|
|||
#define try_to_int(val, mid, raise) \
|
||||
convert_type_with_id(val, "Integer", mid, raise, -1)
|
||||
|
||||
static VALUE
|
||||
ALWAYS_INLINE(static VALUE rb_to_integer(VALUE val, const char *method, ID mid));
|
||||
static inline VALUE
|
||||
rb_to_integer(VALUE val, const char *method, ID mid)
|
||||
{
|
||||
VALUE v;
|
||||
|
|
Loading…
Add table
Reference in a new issue