json: slightly reorder JsonVariant

Let's move things around a bit, so that the trailing unused whitespace
within the structure due to padding is placed together, so that it is
easier to use for new fields. (Found with pahole)
This commit is contained in:
Lennart Poettering 2018-10-12 14:49:50 +02:00
parent 4ae7e4e5d8
commit a7efb03039
1 changed files with 4 additions and 4 deletions

View File

@ -45,6 +45,10 @@ struct JsonVariant {
JsonVariant *parent;
};
/* If this was parsed from some file or buffer, this stores where from, as well as the source line/column */
JsonSource *source;
unsigned line, column;
JsonVariantType type:5;
/* A marker whether this variant is embedded into in array/object or not. If true, the 'parent' pointer above
@ -59,10 +63,6 @@ struct JsonVariant {
/* While comparing two arrays, we use this for marking what we already have seen */
bool is_marked:1;
/* If this was parsed from some file or buffer, this stores where from, as well as the source line/column */
unsigned line, column;
JsonSource *source;
union {
/* For simple types we store the value in-line. */
JsonValue value;