mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-12 16:00:59 +00:00
FlatBuffers Version 2.0.8 (#7492)
This commit is contained in:
@@ -651,11 +651,11 @@ class CSharpGenerator : public BaseGenerator {
|
||||
code += " public ByteBuffer ByteBuffer { get { return __p.bb; } }\n";
|
||||
|
||||
if (!struct_def.fixed) {
|
||||
// Generate verson check method.
|
||||
// Generate version check method.
|
||||
// Force compile time error if not using the same version runtime.
|
||||
code += " public static void ValidateVersion() {";
|
||||
code += " FlatBufferConstants.";
|
||||
code += "FLATBUFFERS_2_0_0(); ";
|
||||
code += "FLATBUFFERS_2_0_8(); ";
|
||||
code += "}\n";
|
||||
|
||||
// Generate a special accessor for the table that when used as the root
|
||||
|
||||
@@ -661,11 +661,11 @@ class JavaGenerator : public BaseGenerator {
|
||||
code += " {\n";
|
||||
|
||||
if (!struct_def.fixed) {
|
||||
// Generate verson check method.
|
||||
// Generate version check method.
|
||||
// Force compile time error if not using the same version runtime.
|
||||
code += " public static void ValidateVersion() {";
|
||||
code += " Constants.";
|
||||
code += "FLATBUFFERS_2_0_0(); ";
|
||||
code += "FLATBUFFERS_2_0_8(); ";
|
||||
code += "}\n";
|
||||
|
||||
// Generate a special accessor for the table that when used as the root
|
||||
|
||||
@@ -500,12 +500,12 @@ class KotlinGenerator : public BaseGenerator {
|
||||
if (!struct_def.fixed) {
|
||||
FieldDef *key_field = nullptr;
|
||||
|
||||
// Generate verson check method.
|
||||
// Generate version check method.
|
||||
// Force compile time error if not using the same version
|
||||
// runtime.
|
||||
GenerateFunOneLine(
|
||||
writer, "validateVersion", "", "",
|
||||
[&]() { writer += "Constants.FLATBUFFERS_2_0_0()"; },
|
||||
[&]() { writer += "Constants.FLATBUFFERS_2_0_8()"; },
|
||||
options.gen_jvmstatic);
|
||||
|
||||
GenerateGetRootAsAccessors(namer_.Type(struct_def), writer, options);
|
||||
|
||||
@@ -1873,7 +1873,7 @@ class SwiftGenerator : public BaseGenerator {
|
||||
}
|
||||
|
||||
std::string ValidateFunc() {
|
||||
return "static func validateVersion() { FlatBuffersVersion_2_0_0() }";
|
||||
return "static func validateVersion() { FlatBuffersVersion_2_0_8() }";
|
||||
}
|
||||
|
||||
std::string GenType(const Type &type,
|
||||
|
||||
Reference in New Issue
Block a user