{%- macro init_fixed_array(instance_ptr_token_with_format, data_type) -%}
    {%- if data_type.element_type is PrimitiveType %}
        memset({{ instance_ptr_token_with_format.format('0') }}, 0, sizeof({{ data_type.element_type | declaration }}) * {{ data_type.capacity }});
    {%- else %}
        /* Initializing {{ data_type.capacity }} indicies of fixed array */
            {%- for index in range(data_type.capacity) %}
        {{ data_type.element_type | full_reference_name }}_init({{ instance_ptr_token_with_format.format(index) }});
            {%- endfor -%}
    {%- endif -%}
{%- endmacro -%}
{%- macro init_field(instance_ptr_token, field) -%}
    {%- if field is padding %}
         /* Ignoring {{ field.data_type.bit_length }} padding bit(s). */
    {%- elif field.data_type is PrimitiveType %}
        {{ instance_ptr_token }}->{{ field | id }} = 0;
    {%- elif field.data_type is VariableLengthArrayType %}
        {{ instance_ptr_token }}->{{ field | id }}_length = 0;
    {%- elif field.data_type is FixedLengthArrayType -%}
        {{ init_fixed_array('&(' + instance_ptr_token + '->{}[{{}}])'.format( field | id ), field.data_type) }}
    {%- else %}
        {{ field.data_type | full_reference_name }}_init(&({{ instance_ptr_token }}->{{ field | id }}));
    {%- endif -%}
{%- endmacro -%}