diff options
author | Koichi Sasada <ko1@atdot.net> | 2021-11-11 23:00:42 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2021-11-19 08:32:07 +0900 |
commit | 6c64013978e77637995a0348f7e232068b9f61b4 (patch) | |
tree | 7c06e1bf99d6f0f8811b33daab8a1692dbb21d5d /gc.rb | |
parent | c347038d4ea246d686fcd4ddc8761a91e4dd25ab (diff) |
use ULL2NUM directly.
@nobu pointed out that ULL (unsigned long long) should have at
least 64 bits so ULL2NUM(uint64_t) is not problem.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4757
Diffstat (limited to 'gc.rb')
-rw-r--r-- | gc.rb | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -292,23 +292,13 @@ module GC } end - Primitive.cinit! %{ - #if SIZEOF_LONG == 8 - #define UINT64_2NUM RB_ULONG2NUM - #elif SIZEOF_LONG_LONG == 8 - #define UINT64_2NUM RB_ULL2NUM - #else - #error Can not make UINT64_2NUM - #endif - } - # call-seq: # GC.total_time -> int # # Return measured GC total time in nano seconds. def self.total_time Primitive.cexpr! %{ - UINT64_2NUM(rb_objspace.profile.total_time_ns) + ULL2NUM(rb_objspace.profile.total_time_ns) } end end |