Branch: Tag:

2018-01-19

2018-01-19 16:14:39 by Martin Nilsson <nilsson@fastmail.com>

Use the ALLOC_STRUCT macro when possible.

2525:    /* Add the initial inherit, this is needed for clone_object()    * to actually call the event handler, and for low_enter_compiler()    * to find the storage and context. */ -  p->inherits = inh = xalloc(sizeof(struct inherit)); +  p->inherits = inh = ALLOC_STRUCT(inherit);    inh->prog = p;    inh->inherit_level = 0;    inh->identifier_level = 0;
2555:    p2->alignment_needed = ALIGNOF(struct compilation);    p2->storage_needed = p2->xstorage + sizeof(struct compilation);    -  p2->inherits = inh = xalloc(sizeof(struct inherit)); +  p2->inherits = inh = ALLOC_STRUCT(inherit);    inh->prog = p2;    inh->inherit_level = 0;    inh->identifier_level = 0;