From c566c968f96ba02e7e775c88b5cbb150fb3839e9 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 22 Dec 2022 15:03:40 -0800 Subject: Hide RubyVM::Shape's interface as much as possible [ci skip] RubyVM::Shape is usually not available (you need SHAPE_DEBUG macro, which is not defined by default). So it seems confusing to leave RubyVM::Shape in the document. This hides only method definitions because, well, I can't find a way to hide things defined by rb_define_const or rb_struct_define_under. I gave up making the C-based documentation right. You should define things in Ruby instead. --- shape.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'shape.c') diff --git a/shape.c b/shape.c index 61054ab00a..7580003412 100644 --- a/shape.c +++ b/shape.c @@ -555,6 +555,7 @@ rb_shape_memsize(rb_shape_t *shape) * Exposing Shape to Ruby via RubyVM.debug_shape */ +/* :nodoc: */ static VALUE rb_shape_too_complex(VALUE self) { @@ -603,6 +604,7 @@ rb_edges_to_hash(ID key, VALUE value, void *ref) return ID_TABLE_CONTINUE; } +/* :nodoc: */ static VALUE rb_shape_edges(VALUE self) { @@ -631,6 +633,7 @@ rb_shape_edge_name(rb_shape_t * shape) return Qnil; } +/* :nodoc: */ static VALUE rb_shape_export_depth(VALUE self) { @@ -639,6 +642,7 @@ rb_shape_export_depth(VALUE self) return SIZET2NUM(rb_shape_depth(shape)); } +/* :nodoc: */ static VALUE rb_shape_parent(VALUE self) { @@ -652,12 +656,14 @@ rb_shape_parent(VALUE self) } } +/* :nodoc: */ static VALUE rb_shape_debug_shape(VALUE self, VALUE obj) { return rb_shape_t_to_rb_cShape(rb_shape_get_shape(obj)); } +/* :nodoc: */ static VALUE rb_shape_root_shape(VALUE self) { @@ -680,6 +686,7 @@ static VALUE edges(struct rb_id_table* edges) return hash; } +/* :nodoc: */ VALUE rb_obj_shape(rb_shape_t* shape) { @@ -699,12 +706,14 @@ rb_obj_shape(rb_shape_t* shape) return rb_shape; } +/* :nodoc: */ static VALUE shape_transition_tree(VALUE self) { return rb_obj_shape(rb_shape_get_root_shape()); } +/* :nodoc: */ static VALUE rb_shape_find_by_id(VALUE mod, VALUE id) { -- cgit v1.2.1