diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-12-30 16:03:35 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2026-01-04 09:02:40 -0500 |
| commit | 6939f03f4cec6c50cbc1d214a38cdcdcf1d3f705 (patch) | |
| tree | df8e767282a0f6a9dc1feae4152249228ac1cb23 /include/ruby/internal | |
| parent | 1b3382cbab83f0dbf21b0d3683d4ab5335f6c342 (diff) | |
Add field handle_weak_references to TypedData
This commit adds a field handle_weak_references to rb_data_type_struct for
the callback when handling weak references. This avoids TypedData objects
from needing to expose their rb_data_type_struct and weak references function.
Diffstat (limited to 'include/ruby/internal')
| -rw-r--r-- | include/ruby/internal/core/rtypeddata.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/ruby/internal/core/rtypeddata.h b/include/ruby/internal/core/rtypeddata.h index aadccc238b..bf6423f8d2 100644 --- a/include/ruby/internal/core/rtypeddata.h +++ b/include/ruby/internal/core/rtypeddata.h @@ -262,11 +262,9 @@ struct rb_data_type_struct { RUBY_DATA_FUNC dcompact; /** - * This field is reserved for future extension. For now, it must be - * filled with zeros. + * @internal */ - void *reserved[1]; /* For future extension. - This array *must* be filled with ZERO. */ + void (*handle_weak_references)(void *); } function; /** |
