We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c4e368 commit 2de67d4Copy full SHA for 2de67d4
shape.c
@@ -357,18 +357,14 @@ static const rb_data_type_t shape_tree_type = {
357
static inline shape_id_t
358
raw_shape_id(rb_shape_t *shape)
359
{
360
- if (shape == NULL) {
361
- return INVALID_SHAPE_ID;
362
- }
+ RUBY_ASSERT(shape);
363
return (shape_id_t)(shape - GET_SHAPE_TREE()->shape_list);
364
}
365
366
367
shape_id(rb_shape_t *shape, shape_id_t previous_shape_id)
368
369
370
371
372
shape_id_t raw_id = (shape_id_t)(shape - GET_SHAPE_TREE()->shape_list);
373
return raw_id | (previous_shape_id & SHAPE_ID_FLAGS_MASK);
374
0 commit comments