Add a macro for SHAPE_DEBUG
Like before, default to VM_CHECK_MODE > 0, but this allows just enabling shape debug helpers without the rest of VM_CHECK_MODE.
This commit is contained in:
parent
da204d2eee
commit
f0cf70c840
Notes:
git
2022-12-01 23:37:34 +00:00
8
shape.c
8
shape.c
@ -7,6 +7,10 @@
|
|||||||
#include "internal/variable.h"
|
#include "internal/variable.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifndef SHAPE_DEBUG
|
||||||
|
#define SHAPE_DEBUG (VM_CHECK_MODE > 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
static ID id_frozen;
|
static ID id_frozen;
|
||||||
static ID id_t_object;
|
static ID id_t_object;
|
||||||
static ID size_pool_edge_names[SIZE_POOL_COUNT];
|
static ID size_pool_edge_names[SIZE_POOL_COUNT];
|
||||||
@ -339,7 +343,7 @@ rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape)
|
|||||||
return midway_shape;
|
return midway_shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VM_CHECK_MODE > 0
|
#if SHAPE_DEBUG
|
||||||
VALUE rb_cShape;
|
VALUE rb_cShape;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -617,7 +621,7 @@ Init_default_shapes(void)
|
|||||||
void
|
void
|
||||||
Init_shape(void)
|
Init_shape(void)
|
||||||
{
|
{
|
||||||
#if VM_CHECK_MODE > 0
|
#if SHAPE_DEBUG
|
||||||
rb_cShape = rb_define_class_under(rb_cRubyVM, "Shape", rb_cObject);
|
rb_cShape = rb_define_class_under(rb_cRubyVM, "Shape", rb_cObject);
|
||||||
rb_undef_alloc_func(rb_cShape);
|
rb_undef_alloc_func(rb_cShape);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user