mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 21:43:57 +00:00
Clarify flatbuffer reflection struct sizes to be less error-prone. (#4870)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
b9f1103b8a
commit
e203882d54
@@ -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.
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user