зеркало из https://github.com/github/ruby.git
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.
This commit is contained in:
Родитель
033e19dabf
Коммит
c566c968f9
9
shape.c
9
shape.c
|
@ -555,6 +555,7 @@ rb_shape_memsize(rb_shape_t *shape)
|
||||||
* Exposing Shape to Ruby via RubyVM.debug_shape
|
* Exposing Shape to Ruby via RubyVM.debug_shape
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_too_complex(VALUE self)
|
rb_shape_too_complex(VALUE self)
|
||||||
{
|
{
|
||||||
|
@ -603,6 +604,7 @@ rb_edges_to_hash(ID key, VALUE value, void *ref)
|
||||||
return ID_TABLE_CONTINUE;
|
return ID_TABLE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_edges(VALUE self)
|
rb_shape_edges(VALUE self)
|
||||||
{
|
{
|
||||||
|
@ -631,6 +633,7 @@ rb_shape_edge_name(rb_shape_t * shape)
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_export_depth(VALUE self)
|
rb_shape_export_depth(VALUE self)
|
||||||
{
|
{
|
||||||
|
@ -639,6 +642,7 @@ rb_shape_export_depth(VALUE self)
|
||||||
return SIZET2NUM(rb_shape_depth(shape));
|
return SIZET2NUM(rb_shape_depth(shape));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_parent(VALUE self)
|
rb_shape_parent(VALUE self)
|
||||||
{
|
{
|
||||||
|
@ -652,12 +656,14 @@ rb_shape_parent(VALUE self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_debug_shape(VALUE self, VALUE obj)
|
rb_shape_debug_shape(VALUE self, VALUE obj)
|
||||||
{
|
{
|
||||||
return rb_shape_t_to_rb_cShape(rb_shape_get_shape(obj));
|
return rb_shape_t_to_rb_cShape(rb_shape_get_shape(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_root_shape(VALUE self)
|
rb_shape_root_shape(VALUE self)
|
||||||
{
|
{
|
||||||
|
@ -680,6 +686,7 @@ static VALUE edges(struct rb_id_table* edges)
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
VALUE
|
VALUE
|
||||||
rb_obj_shape(rb_shape_t* shape)
|
rb_obj_shape(rb_shape_t* shape)
|
||||||
{
|
{
|
||||||
|
@ -699,12 +706,14 @@ rb_obj_shape(rb_shape_t* shape)
|
||||||
return rb_shape;
|
return rb_shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
shape_transition_tree(VALUE self)
|
shape_transition_tree(VALUE self)
|
||||||
{
|
{
|
||||||
return rb_obj_shape(rb_shape_get_root_shape());
|
return rb_obj_shape(rb_shape_get_root_shape());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_shape_find_by_id(VALUE mod, VALUE id)
|
rb_shape_find_by_id(VALUE mod, VALUE id)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче