diff options
author | Jean Boussier <[email protected]> | 2023-11-21 12:09:13 +0100 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2023-11-21 15:15:03 +0100 |
commit | b4f551686b973b03665bcaa3ecf128c0a87ff58b (patch) | |
tree | dca4ec9782eb66ed6ed0ce5aee21cea36377d745 /time.c | |
parent | fafdc8a62bd17f0e015fc99840dba7ce8aa4547c (diff) |
Get rid of useless dsize functions
If we always return 0, we might as well not define
the function at all.
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -1841,15 +1841,13 @@ time_mark(void *ptr) rb_gc_mark(tobj->vtm.zone); } -static size_t -time_memsize(const void *tobj) -{ - return 0; -} - static const rb_data_type_t time_data_type = { "time", - {time_mark, RUBY_TYPED_DEFAULT_FREE, time_memsize,}, + { + time_mark, + RUBY_TYPED_DEFAULT_FREE, + NULL, // No external memory to report, + }, 0, 0, (RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_EMBEDDABLE), }; |