Don't cache on platforms without mmap

We're only going to create a redblack tree on platforms that have mmap
This commit is contained in:
Aaron Patterson 2023-10-23 13:53:42 -07:00 committed by Aaron Patterson
parent a3f66e09f6
commit 54230dea1b

View File

@ -380,6 +380,7 @@ rb_shape_alloc(ID edge_name, rb_shape_t * parent, enum shape_type type)
return shape;
}
#ifdef HAVE_MMAP
static redblack_node_t *
redblack_cache_ancestors(rb_shape_t * shape)
{
@ -407,6 +408,13 @@ redblack_cache_ancestors(rb_shape_t * shape)
}
}
}
#else
static redblack_node_t *
redblack_cache_ancestors(rb_shape_t * shape)
{
return LEAF;
}
#endif
static rb_shape_t *
rb_shape_alloc_new_child(ID id, rb_shape_t * shape, enum shape_type shape_type)