sequence and variant types: use previous field for length/tag if NULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 24 Apr 2021 00:29:27 +0000 (20:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Apr 2021 17:52:51 +0000 (13:52 -0400)
A common use-case for sequences and variants is to use the field located
immediately prior to the type as length/tag.

The fact that those types need to explicitly contain their length/tag
name ties the sequence/variant type to where it is placed within the
structure fields, preventing re-use of the sequence/variant type.

In order to reduce the memory footprint of the field descriptions and
allow re-use of common field types, special-case the NULL length name
and tag name to use the field prior to the sequence/variant as length.

This allows more efficient type descriptions without reducing the
overall flexibility of sequence/variant layout.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I27053e8541beb4f8f8226e411c71595f7527f533


No differences found
This page took 0.025778 seconds and 4 git commands to generate.