Commit e203882d authored by Andrew Selle's avatar Andrew Selle Committed by Wouter van Oortmerssen

Clarify flatbuffer reflection struct sizes to be less error-prone. (#4870)

parent b9f1103b
...@@ -2298,9 +2298,9 @@ typedef const TypeTable *(*TypeFunction)(); ...@@ -2298,9 +2298,9 @@ typedef const TypeTable *(*TypeFunction)();
struct TypeTable { struct TypeTable {
SequenceType st; SequenceType st;
size_t num_elems; // of each of the arrays below. size_t num_elems; // of type_codes, values, names (but not type_refs).
const TypeCode *type_codes; const TypeCode *type_codes; // num_elems count
const TypeFunction *type_refs; const TypeFunction *type_refs; // less than num_elems entries (see TypeCode).
const int32_t *values; // Only set for non-consecutive enum/union or structs. const int32_t *values; // Only set for non-consecutive enum/union or structs.
const char * const *names; // Only set if compiled with --reflect-names. const char * const *names; // Only set if compiled with --reflect-names.
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment