Skip to content

Commit b0d78ef

Browse files
committed
support variable offset sizes for real
1 parent b561f67 commit b0d78ef

16 files changed

+180
-74
lines changed

include/flatcc/flatcc_identifier.h

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,41 @@ static inline void flatbuffers_identifier_from_type_hash(flatbuffers_thash_t typ
6666
out_identifier[0] = (char)(type_hash & 0xff);
6767
type_hash >>= 8;
6868
out_identifier[1] = (char)(type_hash & 0xff);
69+
70+
#if FLATBUFFERS_THASH_WIDTH > 16
6971
type_hash >>= 8;
7072
out_identifier[2] = (char)(type_hash & 0xff);
7173
type_hash >>= 8;
7274
out_identifier[3] = (char)(type_hash & 0xff);
75+
#endif
76+
77+
#if FLATBUFFERS_THASH_WIDTH > 32
78+
type_hash >>= 8;
79+
out_identifier[4] = (char)(type_hash & 0xff);
80+
type_hash >>= 8;
81+
out_identifier[5] = (char)(type_hash & 0xff);
82+
type_hash >>= 8;
83+
out_identifier[6] = (char)(type_hash & 0xff);
84+
type_hash >>= 8;
85+
out_identifier[7] = (char)(type_hash & 0xff);
86+
#endif
7387
}
7488

7589
/* Native integer encoding of file identifier. */
7690
static inline flatbuffers_thash_t flatbuffers_type_hash_from_identifier(const flatbuffers_fid_t identifier)
7791
{
7892
uint8_t *p = (uint8_t *)identifier;
7993

80-
return identifier ?
81-
(uint32_t)p[0] + (((uint32_t)p[1]) << 8) + (((uint32_t)p[2]) << 16) + (((uint32_t)p[3]) << 24) : 0;
94+
return !identifier ? 0 :
95+
96+
#if FLATBUFFERS_THASH_WIDTH == 16
97+
(uint16_t)p[0] + (((uint16_t)p[1]) << 8);
98+
#elif FLATBUFFERS_THASH_WIDTH == 32
99+
(uint32_t)p[0] + (((uint32_t)p[1]) << 8) + (((uint32_t)p[2]) << 16) + (((uint32_t)p[3]) << 24);
100+
#elif FLATBUFFERS_THASH_WIDTH == 64
101+
(uint64_t)p[0] + (((uint64_t)p[1]) << 8) + (((uint64_t)p[2]) << 16) + (((uint64_t)p[3]) << 24) +
102+
(((uint64_t)p[4]) << 32) + (((uint64_t)p[5]) << 40) + (((uint64_t)p[6]) << 48) + (((uint64_t)p[7]) << 56);
103+
#endif
82104
}
83105

84106
/*
@@ -95,10 +117,25 @@ static inline flatbuffers_thash_t flatbuffers_type_hash_from_string(const char *
95117
h += ((flatbuffers_thash_t)p[0]);
96118
if (!p[1]) return h;
97119
h += ((flatbuffers_thash_t)p[1]) << 8;
120+
121+
#if FLATBUFFERS_THASH_WIDTH > 16
98122
if (!p[2]) return h;
99123
h += ((flatbuffers_thash_t)p[2]) << 16;
100-
/* No need to test for termination here. */
124+
if (!p[3]) return h;
101125
h += ((flatbuffers_thash_t)p[3]) << 24;
126+
#endif
127+
128+
#if FLATBUFFERS_THASH_WIDTH > 32
129+
if (!p[4]) return h;
130+
h += ((flatbuffers_thash_t)p[4]) << 32;
131+
if (!p[5]) return h;
132+
h += ((flatbuffers_thash_t)p[5]) << 40;
133+
if (!p[6]) return h;
134+
h += ((flatbuffers_thash_t)p[6]) << 48;
135+
if (!p[7]) return h;
136+
h += ((flatbuffers_thash_t)p[7]) << 56;
137+
#endif
138+
102139
return h;
103140
}
104141

@@ -125,21 +162,31 @@ static inline void flatbuffers_identifier_from_name(const char *name, flatbuffer
125162
* additional information and just complicates matters. Furthermore, the
126163
* unmodified type hash has the benefit that it can seed a child namespace.
127164
*/
128-
static inline uint32_t flatbuffers_disperse_type_hash(flatbuffers_thash_t type_hash)
165+
static inline flatbuffers_thash_t flatbuffers_disperse_type_hash(flatbuffers_thash_t type_hash)
129166
{
167+
flatbuffers_thash_t x = type_hash;
168+
169+
#if FLATBUFFERS_THASH_WIDTH == 32
130170
/* http://stackoverflow.com/a/12996028 */
131-
uint32_t x = type_hash;
132171

133172
x = ((x >> 16) ^ x) * UINT32_C(0x45d9f3b);
134173
x = ((x >> 16) ^ x) * UINT32_C(0x45d9f3b);
135174
x = ((x >> 16) ^ x);
175+
#elif FLATBUFFERS_THASH_WIDTH == 64
176+
/* http://stackoverflow.com/a/12996028 */
177+
178+
x = (x ^ (x >> 30)) * UINT64_C(0xbf58476d1ce4e5b9);
179+
x = (x ^ (x >> 27)) * UINT64_C(0x94d049bb133111eb);
180+
x = x ^ (x >> 31);
181+
#endif
182+
136183
return x;
137184
}
138185

139186

140187
/* We have hardcoded assumptions about identifier size. */
141-
static_assert(sizeof(flatbuffers_fid_t) == 4, "unexpected file identifier size");
142-
static_assert(sizeof(flatbuffers_thash_t) == 4, "unexpected type hash size");
188+
//static_assert(sizeof(flatbuffers_fid_t) == 4, "unexpected file identifier size");
189+
//static_assert(sizeof(flatbuffers_thash_t) == 4, "unexpected type hash size");
143190

144191
#ifdef __cplusplus
145192
}

include/flatcc/flatcc_json_parser.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static inline const char *flatcc_json_parser_string_end(flatcc_json_parser_t *ct
168168
* and raise errors according to overflow/underflow runtime flags. Zero
169169
* and truncate as needed. A trailing zero is not inserted if the input
170170
* is at least the same length as the char array.
171-
*
171+
*
172172
* Runtime flags: `skip_array_overflow`, `pad_array_underflow`.
173173
*/
174174
const char *flatcc_json_parser_char_array(flatcc_json_parser_t *ctx,
@@ -875,15 +875,15 @@ const char *flatcc_json_parser_union_type_vector(flatcc_json_parser_t *ctx,
875875
* `flags` default to 0. See also `flatcc_json_parser_flags`.
876876
*/
877877
int flatcc_json_parser_table_as_root(flatcc_builder_t *B, flatcc_json_parser_t *ctx,
878-
const char *buf, size_t bufsiz, int flags, const char *fid,
878+
const char *buf, size_t bufsiz, int flags, const flatbuffers_fid_t fid,
879879
flatcc_json_parser_table_f *parser);
880880

881881
/*
882882
* Similar to `flatcc_json_parser_table_as_root` but parses a struct as
883883
* root.
884884
*/
885885
int flatcc_json_parser_struct_as_root(flatcc_builder_t *B, flatcc_json_parser_t *ctx,
886-
const char *buf, size_t bufsiz, int flags, const char *fid,
886+
const char *buf, size_t bufsiz, int flags, const flatbuffers_fid_t fid,
887887
flatcc_json_parser_struct_f *parser);
888888

889889
#include "flatcc/portable/pdiagnostic_pop.h"

include/flatcc/flatcc_json_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,11 @@ void flatcc_json_printer_uint8_vector_base64_field(flatcc_json_printer_t *ctx,
679679
* require aligned memory addresses (as always for flatbuffers).
680680
*/
681681
int flatcc_json_printer_table_as_root(flatcc_json_printer_t *ctx,
682-
const void *buf, size_t bufsiz, const char *fid,
682+
const void *buf, size_t bufsiz, const flatbuffers_fid_t fid,
683683
flatcc_json_printer_table_f *pf);
684684

685685
int flatcc_json_printer_struct_as_root(flatcc_json_printer_t *ctx,
686-
const void *buf, size_t bufsiz, const char *fid,
686+
const void *buf, size_t bufsiz, const flatbuffers_fid_t fid,
687687
flatcc_json_printer_struct_f *pf);
688688

689689
/*
@@ -756,13 +756,13 @@ void flatcc_json_printer_union_vector_field(flatcc_json_printer_t *ctx,
756756
void flatcc_json_printer_struct_as_nested_root(flatcc_json_printer_t *ctx,
757757
flatcc_json_printer_table_descriptor_t *td,
758758
int id, const char *name, size_t len,
759-
const char *fid,
759+
const flatbuffers_fid_t fid,
760760
flatcc_json_printer_struct_f *pf);
761761

762762
void flatcc_json_printer_table_as_nested_root(flatcc_json_printer_t *ctx,
763763
flatcc_json_printer_table_descriptor_t *td,
764764
int id, const char *name, size_t len,
765-
const char *fid,
765+
const flatbuffers_fid_t fid,
766766
flatcc_json_printer_table_f pf);
767767

768768
void flatcc_json_printer_union_field(flatcc_json_printer_t *ctx,

include/flatcc/flatcc_types.h

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ extern "C" {
1111
#include <stdint.h>
1212
#endif
1313

14+
#include "../../config/config.h"
15+
1416
/*
1517
* This should match generated type declaratios in
1618
* `flatbuffers_common_reader.h` (might have different name prefix).
@@ -44,40 +46,80 @@ extern "C" {
4446
#define flatbuffers_thash_t_defined
4547
#define flatbuffers_fid_t_defined
4648

47-
/* uoffset_t is also used for vector and string headers. */
48-
#define FLATBUFFERS_UOFFSET_MAX UINT32_MAX
49-
#define FLATBUFFERS_SOFFSET_MAX INT32_MAX
50-
#define FLATBUFFERS_SOFFSET_MIN INT32_MIN
51-
#define FLATBUFFERS_VOFFSET_MAX UINT16_MAX
52-
#define FLATBUFFERS_UTYPE_MAX UINT8_MAX
53-
/* Well - the max of the underlying type. */
54-
#define FLATBUFFERS_BOOL_MAX UINT8_MAX
55-
#define FLATBUFFERS_THASH_MAX UINT32_MAX
56-
5749
#define FLATBUFFERS_ID_MAX (FLATBUFFERS_VOFFSET_MAX / sizeof(flatbuffers_voffset_t) - 3)
5850
/* Vectors of empty structs can yield div by zero, so we must guard against this. */
5951
#define FLATBUFFERS_COUNT_MAX(elem_size) (FLATBUFFERS_UOFFSET_MAX/((elem_size) == 0 ? 1 : (elem_size)))
6052

61-
#define FLATBUFFERS_UOFFSET_WIDTH 32
62-
#define FLATBUFFERS_COUNT_WIDTH 32
63-
#define FLATBUFFERS_SOFFSET_WIDTH 32
64-
#define FLATBUFFERS_VOFFSET_WIDTH 16
65-
#define FLATBUFFERS_UTYPE_WIDTH 8
66-
#define FLATBUFFERS_BOOL_WIDTH 8
67-
#define FLATBUFFERS_THASH_WIDTH 32
6853

6954
#define FLATBUFFERS_TRUE 1
7055
#define FLATBUFFERS_FALSE 0
7156

7257
#define FLATBUFFERS_PROTOCOL_IS_LE 1
7358
#define FLATBUFFERS_PROTOCOL_IS_BE 0
7459

60+
/* uoffset_t is also used for vector and string headers. */
61+
#if FLATCC_OFFSET_SIZE == 4
7562
typedef uint32_t flatbuffers_uoffset_t;
7663
typedef int32_t flatbuffers_soffset_t;
64+
typedef uint32_t flatbuffers_thash_t;
65+
#define FLATBUFFERS_UOFFSET_MAX UINT32_MAX
66+
#define FLATBUFFERS_SOFFSET_MAX INT32_MAX
67+
#define FLATBUFFERS_SOFFSET_MIN INT32_MIN
68+
#define FLATBUFFERS_THASH_MAX UINT32_MAX
69+
#define FLATBUFFERS_UOFFSET_WIDTH 32
70+
#define FLATBUFFERS_SOFFSET_WIDTH 32
71+
#define FLATBUFFERS_THASH_WIDTH 32
72+
#elif FLATCC_OFFSET_SIZE == 8
73+
typedef uint64_t flatbuffers_uoffset_t;
74+
typedef int64_t flatbuffers_soffset_t;
75+
typedef uint64_t flatbuffers_thash_t;
76+
#define FLATBUFFERS_UOFFSET_MAX UINT64_MAX
77+
#define FLATBUFFERS_SOFFSET_MAX INT64_MAX
78+
#define FLATBUFFERS_SOFFSET_MIN INT64_MIN
79+
#define FLATBUFFERS_THASH_MAX UINT64_MAX
80+
#define FLATBUFFERS_UOFFSET_WIDTH 64
81+
#define FLATBUFFERS_SOFFSET_WIDTH 64
82+
#define FLATBUFFERS_THASH_WIDTH 64
83+
#elif FLATCC_OFFSET_SIZE == 2
84+
typedef uint16_t flatbuffers_uoffset_t;
85+
typedef int16_t flatbuffers_soffset_t;
86+
typedef uint16_t flatbuffers_thash_t;
87+
#define FLATBUFFERS_UOFFSET_MAX UINT16_MAX
88+
#define FLATBUFFERS_SOFFSET_MAX INT16_MAX
89+
#define FLATBUFFERS_SOFFSET_MIN INT16_MIN
90+
#define FLATBUFFERS_THASH_MAX UINT16_MAX
91+
#define FLATBUFFERS_UOFFSET_WIDTH 16
92+
#define FLATBUFFERS_SOFFSET_WIDTH 16
93+
#define FLATBUFFERS_THASH_WIDTH 16
94+
#else
95+
#error FLATCC_OFFSET_SIZE must be defined.
96+
#endif
97+
98+
#if FLATCC_VOFFSET_SIZE == 2
7799
typedef uint16_t flatbuffers_voffset_t;
100+
#define FLATBUFFERS_VOFFSET_MAX UINT16_MAX
101+
#define FLATBUFFERS_VOFFSET_WIDTH 16
102+
#elif FLATCC_VOFFSET_SIZE == 8
103+
typedef uint64_t flatbuffers_voffset_t;
104+
#define FLATBUFFERS_VOFFSET_MAX UINT64_MAX
105+
#define FLATBUFFERS_VOFFSET_WIDTH 64
106+
#elif FLATCC_VOFFSET_SIZE == 4
107+
typedef uint32_t flatbuffers_voffset_t;
108+
#define FLATBUFFERS_VOFFSET_MAX UINT32_MAX
109+
#define FLATBUFFERS_VOFFSET_WIDTH 32
110+
#else
111+
#error FLATCC_VOFFSET_SIZE must be defined.
112+
#endif
113+
114+
#define FLATBUFFERS_UTYPE_MAX UINT8_MAX
115+
#define FLATBUFFERS_UTYPE_WIDTH 8
78116
typedef uint8_t flatbuffers_utype_t;
117+
118+
/* Well - the max of the underlying type. */
119+
#define FLATBUFFERS_BOOL_MAX UINT8_MAX
120+
#define FLATBUFFERS_BOOL_WIDTH 8
79121
typedef uint8_t flatbuffers_bool_t;
80-
typedef uint32_t flatbuffers_thash_t;
122+
81123
/* Public facing type operations. */
82124
typedef flatbuffers_utype_t flatbuffers_union_type_t;
83125

include/flatcc/flatcc_verifier.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ typedef int flatcc_union_verifier_f(flatcc_union_verifier_descriptor_t *ud);
164164
* require aligned memory addresses. The buffer pointers alignment is
165165
* not significant to internal verification of the buffer.
166166
*/
167-
int flatcc_verify_struct_as_root(const void *buf, size_t bufsiz, const char *fid,
167+
int flatcc_verify_struct_as_root(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid,
168168
size_t size, uint16_t align);
169169

170170
int flatcc_verify_struct_as_typed_root(const void *buf, size_t bufsiz, flatbuffers_thash_t thash,
171171
size_t size, uint16_t align);
172172

173-
int flatcc_verify_table_as_root(const void *buf, size_t bufsiz, const char *fid,
173+
int flatcc_verify_table_as_root(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid,
174174
flatcc_table_verifier_f *root_tvf);
175175

176176
int flatcc_verify_table_as_typed_root(const void *buf, size_t bufsiz, flatbuffers_thash_t thash,
@@ -179,7 +179,7 @@ int flatcc_verify_table_as_typed_root(const void *buf, size_t bufsiz, flatbuffer
179179
* The buffer header is verified by any of the `_as_root` verifiers, but
180180
* this function may be used as a quick sanity check.
181181
*/
182-
int flatcc_verify_buffer_header(const void *buf, size_t bufsiz, const char *fid);
182+
int flatcc_verify_buffer_header(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid);
183183

184184
int flatcc_verify_typed_buffer_header(const void *buf, size_t bufsiz, flatbuffers_thash_t type_hash);
185185

@@ -204,10 +204,10 @@ int flatcc_verify_table_vector_field(flatcc_table_verifier_descriptor_t *td,
204204
flatbuffers_voffset_t id, int required, flatcc_table_verifier_f tvf);
205205
/* Table verifiers pass 0 as fid. */
206206
int flatcc_verify_struct_as_nested_root(flatcc_table_verifier_descriptor_t *td,
207-
flatbuffers_voffset_t id, int required, const char *fid,
207+
flatbuffers_voffset_t id, int required, const flatbuffers_fid_t fid,
208208
size_t size, uint16_t align);
209209
int flatcc_verify_table_as_nested_root(flatcc_table_verifier_descriptor_t *td,
210-
flatbuffers_voffset_t id, int required, const char *fid,
210+
flatbuffers_voffset_t id, int required, const flatbuffers_fid_t fid,
211211
uint16_t align, flatcc_table_verifier_f tvf);
212212

213213
/*

include/flatcc/reflection/flatbuffers_common_reader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ __flatbuffers_define_scan_by_scalar_field(N, NK, T)
529529
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp) { return t__tmp ? &(t__tmp->NK) : 0; }\
530530
static inline T N ## _ ## NK (N ## _struct_t t__tmp) { return t__tmp ? &(t__tmp->NK) : 0; }
531531
/* If fid is null, the function returns true without testing as buffer is not expected to have any id. */
532-
static inline int flatbuffers_has_identifier(const void *buffer, const char *fid)
532+
static inline int flatbuffers_has_identifier(const void *buffer, const flatbuffers_fid_t fid)
533533
{ flatbuffers_thash_t id, id2 = 0; if (fid == 0) { return 1; };
534534
id2 = flatbuffers_type_hash_from_string(fid);
535535
id = __flatbuffers_thash_read_from_pe(((flatbuffers_uoffset_t *)buffer) + 1);

include/flatcc/reflection/reflection_verifier.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static inline int reflection_Type_verify_as_typed_root(const void *buf, size_t b
3939
return flatcc_verify_table_as_root(buf, bufsiz, reflection_Type_type_identifier, &reflection_Type_verify_table);
4040
}
4141

42-
static inline int reflection_Type_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
42+
static inline int reflection_Type_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
4343
{
4444
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Type_verify_table);
4545
}
@@ -67,7 +67,7 @@ static inline int reflection_KeyValue_verify_as_typed_root(const void *buf, size
6767
return flatcc_verify_table_as_root(buf, bufsiz, reflection_KeyValue_type_identifier, &reflection_KeyValue_verify_table);
6868
}
6969

70-
static inline int reflection_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
70+
static inline int reflection_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
7171
{
7272
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_KeyValue_verify_table);
7373
}
@@ -98,7 +98,7 @@ static inline int reflection_EnumVal_verify_as_typed_root(const void *buf, size_
9898
return flatcc_verify_table_as_root(buf, bufsiz, reflection_EnumVal_type_identifier, &reflection_EnumVal_verify_table);
9999
}
100100

101-
static inline int reflection_EnumVal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
101+
static inline int reflection_EnumVal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
102102
{
103103
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_EnumVal_verify_table);
104104
}
@@ -130,7 +130,7 @@ static inline int reflection_Enum_verify_as_typed_root(const void *buf, size_t b
130130
return flatcc_verify_table_as_root(buf, bufsiz, reflection_Enum_type_identifier, &reflection_Enum_verify_table);
131131
}
132132

133-
static inline int reflection_Enum_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
133+
static inline int reflection_Enum_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
134134
{
135135
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Enum_verify_table);
136136
}
@@ -168,7 +168,7 @@ static inline int reflection_Field_verify_as_typed_root(const void *buf, size_t
168168
return flatcc_verify_table_as_root(buf, bufsiz, reflection_Field_type_identifier, &reflection_Field_verify_table);
169169
}
170170

171-
static inline int reflection_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
171+
static inline int reflection_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
172172
{
173173
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Field_verify_table);
174174
}
@@ -201,7 +201,7 @@ static inline int reflection_Object_verify_as_typed_root(const void *buf, size_t
201201
return flatcc_verify_table_as_root(buf, bufsiz, reflection_Object_type_identifier, &reflection_Object_verify_table);
202202
}
203203

204-
static inline int reflection_Object_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
204+
static inline int reflection_Object_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
205205
{
206206
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Object_verify_table);
207207
}
@@ -232,7 +232,7 @@ static inline int reflection_RPCCall_verify_as_typed_root(const void *buf, size_
232232
return flatcc_verify_table_as_root(buf, bufsiz, reflection_RPCCall_type_identifier, &reflection_RPCCall_verify_table);
233233
}
234234

235-
static inline int reflection_RPCCall_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
235+
static inline int reflection_RPCCall_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
236236
{
237237
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_RPCCall_verify_table);
238238
}
@@ -262,7 +262,7 @@ static inline int reflection_Service_verify_as_typed_root(const void *buf, size_
262262
return flatcc_verify_table_as_root(buf, bufsiz, reflection_Service_type_identifier, &reflection_Service_verify_table);
263263
}
264264

265-
static inline int reflection_Service_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
265+
static inline int reflection_Service_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
266266
{
267267
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Service_verify_table);
268268
}
@@ -294,7 +294,7 @@ static inline int reflection_Schema_verify_as_typed_root(const void *buf, size_t
294294
return flatcc_verify_table_as_root(buf, bufsiz, reflection_Schema_type_identifier, &reflection_Schema_verify_table);
295295
}
296296

297-
static inline int reflection_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
297+
static inline int reflection_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const flatbuffers_fid_t fid)
298298
{
299299
return flatcc_verify_table_as_root(buf, bufsiz, fid, &reflection_Schema_verify_table);
300300
}

0 commit comments

Comments
 (0)