summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2023-11-21 12:09:13 +0100
committerJean Boussier <[email protected]>2023-11-21 15:15:03 +0100
commitb4f551686b973b03665bcaa3ecf128c0a87ff58b (patch)
treedca4ec9782eb66ed6ed0ce5aee21cea36377d745 /time.c
parentfafdc8a62bd17f0e015fc99840dba7ce8aa4547c (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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/time.c b/time.c
index 3a50fb4318..5dc0b2d4e6 100644
--- a/time.c
+++ b/time.c
@@ -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),
};