summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2022-07-14 10:00:15 -0700
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-18 17:21:45 +0900
commitdffca50bb609661f04660221834c48f36b4b21fa (patch)
treeec14136050ef6bb4f17b31a829081236ca6240d2 /ext/fiddle
parente84ea4af695de307c4e66bf0d9aa445a1016a4af (diff)
[ruby/fiddle] Free closures immediately
(https://github.com/ruby/fiddle/pull/109) These structs don't need to be freed as part of finalization, so lets free them immediately. https://github.com/ruby/fiddle/commit/8a10ec1152
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6576
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/closure.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 83fa752b6d..892f522a62 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -56,6 +56,8 @@ closure_memsize(const void * ptr)
const rb_data_type_t closure_data_type = {
"fiddle/closure",
{0, dealloc, closure_memsize,},
+ 0, 0,
+ RUBY_TYPED_FREE_IMMEDIATELY,
};
struct callback_args {