summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2025-05-27 11:51:29 +0200
committerJean Boussier <jean.boussier@gmail.com>2025-05-27 12:45:24 +0200
commite535f8248b1ad9f18cfc8134dd7e8056d97a6244 (patch)
tree98be43b7ffc1bea7eef31c0e05136a9e3e20884a /shape.h
parentcc48fcdff22689cdca04181105582150b01904a1 (diff)
Get rid of `rb_shape_id(rb_shape_t *)`
We should avoid conversions from `rb_shape_t *` into `shape_id_t` outside of `shape.c` as the short term goal is to have `shape_id_t` contain tags.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13448
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/shape.h b/shape.h
index 9f0d5e8b14..02a95b5006 100644
--- a/shape.h
+++ b/shape.h
@@ -219,12 +219,11 @@ rb_shape_obj_has_id(VALUE obj)
// For ext/objspace
RUBY_SYMBOL_EXPORT_BEGIN
-typedef void each_shape_callback(rb_shape_t *shape, void *data);
-void rb_shape_each_shape(each_shape_callback callback, void *data);
+typedef void each_shape_callback(shape_id_t shape_id, void *data);
+void rb_shape_each_shape_id(each_shape_callback callback, void *data);
size_t rb_shape_memsize(shape_id_t shape);
size_t rb_shape_edges_count(shape_id_t shape_id);
size_t rb_shape_depth(shape_id_t shape_id);
-shape_id_t rb_shape_id(rb_shape_t *shape);
RUBY_SYMBOL_EXPORT_END
#endif