Jeff King writes:
> diff --git a/alloc.c b/alloc.c
> index 03e458b..fd2e32d 100644
> --- a/alloc.c
> +++ b/alloc.c
> @@ -52,6 +52,7 @@ static struct alloc_state blob_state;
> void *alloc_blob_node(void)
> {
> struct blob *b = alloc_node(&blob_state, sizeof(struct blob));
> + b->object
The "struct object" type implements basic object
polymorphism. Individual instances are allocated as
concrete types (or as a union type that can store any
object), and a "struct object *" can be cast into its real
type after examining its "type" enum. This means it is
dangerous to have a type fie
2 matches
Mail list logo