aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2024-03-29 06:01:25 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2024-03-29 06:10:59 +0300
commita21f8f835e55425029f398bd3c1829b01c82f3c8 (patch)
tree5f41cddb7b02bf144c95e39b7c1bde2d36b7920d /contrib/libs
parent68504504c5056b2c93ba61abb1f3c1737b56930f (diff)
downloadydb-a21f8f835e55425029f398bd3c1829b01c82f3c8.tar.gz
Update contrib/libs/flatbuffers to 24.3.25
62e6ced1e7bd530347c0f0f4cf53953c063e0c4b
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/flatbuffers/CHANGELOG.md5
-rw-r--r--contrib/libs/flatbuffers/include/flatbuffers/base.h2
-rw-r--r--contrib/libs/flatbuffers/include/flatbuffers/reflection_generated.h44
-rw-r--r--contrib/libs/flatbuffers/src/idl_gen_cpp.cpp12
-rw-r--r--contrib/libs/flatbuffers/src/idl_gen_csharp.cpp2
-rw-r--r--contrib/libs/flatbuffers/src/idl_gen_java.cpp2
-rw-r--r--contrib/libs/flatbuffers/src/idl_gen_kotlin.cpp2
-rw-r--r--contrib/libs/flatbuffers/src/idl_gen_lobster.cpp12
-rw-r--r--contrib/libs/flatbuffers/src/idl_gen_swift.cpp2
-rw-r--r--contrib/libs/flatbuffers/ya.make4
10 files changed, 76 insertions, 11 deletions
diff --git a/contrib/libs/flatbuffers/CHANGELOG.md b/contrib/libs/flatbuffers/CHANGELOG.md
index c7d1157f2f..2b0380df6c 100644
--- a/contrib/libs/flatbuffers/CHANGELOG.md
+++ b/contrib/libs/flatbuffers/CHANGELOG.md
@@ -4,6 +4,11 @@ All major or breaking changes will be documented in this file, as well as any
new features that should be highlighted. Minor fixes or improvements are not
necessarily listed.
+## [24.3.25] (March 25 2024)(https://github.com/google/flatbuffers/releases/tag/v24.3.25)
+
+* Fixed license metadata parsing (#8253)
+* [C++] Allow string_view in `LookUpByKey` in addition to null-terminated c-style strings (#8203)
+
## [24.3.7] (March 7 2024)(https://github.com/google/flatbuffers/releases/tag/v24.3.7)
* Just to fix some of the CI build issues from the 24.3.6 release.
diff --git a/contrib/libs/flatbuffers/include/flatbuffers/base.h b/contrib/libs/flatbuffers/include/flatbuffers/base.h
index 43cfae7fe5..99a33116e4 100644
--- a/contrib/libs/flatbuffers/include/flatbuffers/base.h
+++ b/contrib/libs/flatbuffers/include/flatbuffers/base.h
@@ -141,7 +141,7 @@
#define FLATBUFFERS_VERSION_MAJOR 24
#define FLATBUFFERS_VERSION_MINOR 3
-#define FLATBUFFERS_VERSION_REVISION 7
+#define FLATBUFFERS_VERSION_REVISION 25
#define FLATBUFFERS_STRING_EXPAND(X) #X
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
namespace flatbuffers {
diff --git a/contrib/libs/flatbuffers/include/flatbuffers/reflection_generated.h b/contrib/libs/flatbuffers/include/flatbuffers/reflection_generated.h
index 9f83dcb5d4..4c2adb1bff 100644
--- a/contrib/libs/flatbuffers/include/flatbuffers/reflection_generated.h
+++ b/contrib/libs/flatbuffers/include/flatbuffers/reflection_generated.h
@@ -10,7 +10,7 @@
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
FLATBUFFERS_VERSION_MINOR == 3 &&
- FLATBUFFERS_VERSION_REVISION == 7,
+ FLATBUFFERS_VERSION_REVISION == 25,
"Non-compatible flatbuffers version included");
namespace reflection {
@@ -274,6 +274,12 @@ struct KeyValue FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_key) const {
return strcmp(key()->c_str(), _key);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _key) const {
+ if (key()->c_str() < _key) return -1;
+ if (_key < key()->c_str()) return 1;
+ return 0;
+ }
const ::flatbuffers::String *value() const {
return GetPointer<const ::flatbuffers::String *>(VT_VALUE);
}
@@ -464,6 +470,12 @@ struct Enum FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_name) const {
return strcmp(name()->c_str(), _name);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _name) const {
+ if (name()->c_str() < _name) return -1;
+ if (_name < name()->c_str()) return 1;
+ return 0;
+ }
const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::EnumVal>> *values() const {
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::EnumVal>> *>(VT_VALUES);
}
@@ -616,6 +628,12 @@ struct Field FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_name) const {
return strcmp(name()->c_str(), _name);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _name) const {
+ if (name()->c_str() < _name) return -1;
+ if (_name < name()->c_str()) return 1;
+ return 0;
+ }
const reflection::Type *type() const {
return GetPointer<const reflection::Type *>(VT_TYPE);
}
@@ -834,6 +852,12 @@ struct Object FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_name) const {
return strcmp(name()->c_str(), _name);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _name) const {
+ if (name()->c_str() < _name) return -1;
+ if (_name < name()->c_str()) return 1;
+ return 0;
+ }
const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Field>> *fields() const {
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Field>> *>(VT_FIELDS);
}
@@ -986,6 +1010,12 @@ struct RPCCall FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_name) const {
return strcmp(name()->c_str(), _name);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _name) const {
+ if (name()->c_str() < _name) return -1;
+ if (_name < name()->c_str()) return 1;
+ return 0;
+ }
const reflection::Object *request() const {
return GetPointer<const reflection::Object *>(VT_REQUEST);
}
@@ -1102,6 +1132,12 @@ struct Service FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_name) const {
return strcmp(name()->c_str(), _name);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _name) const {
+ if (name()->c_str() < _name) return -1;
+ if (_name < name()->c_str()) return 1;
+ return 0;
+ }
const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::RPCCall>> *calls() const {
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::RPCCall>> *>(VT_CALLS);
}
@@ -1221,6 +1257,12 @@ struct SchemaFile FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
int KeyCompareWithValue(const char *_filename) const {
return strcmp(filename()->c_str(), _filename);
}
+ template<typename StringType>
+ int KeyCompareWithValue(const StringType& _filename) const {
+ if (filename()->c_str() < _filename) return -1;
+ if (_filename < filename()->c_str()) return 1;
+ return 0;
+ }
/// Names of included files, relative to project root.
const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *included_filenames() const {
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *>(VT_INCLUDED_FILENAMES);
diff --git a/contrib/libs/flatbuffers/src/idl_gen_cpp.cpp b/contrib/libs/flatbuffers/src/idl_gen_cpp.cpp
index 47fd153347..866c1c3a17 100644
--- a/contrib/libs/flatbuffers/src/idl_gen_cpp.cpp
+++ b/contrib/libs/flatbuffers/src/idl_gen_cpp.cpp
@@ -2417,8 +2417,20 @@ class CppGenerator : public BaseGenerator {
// Generate KeyCompareWithValue function
if (is_string) {
+ // Compares key against a null-terminated char array.
code_ += " int KeyCompareWithValue(const char *_{{FIELD_NAME}}) const {";
code_ += " return strcmp({{FIELD_NAME}}()->c_str(), _{{FIELD_NAME}});";
+ code_ += " }";
+ // Compares key against any string-like object (e.g. std::string_view or
+ // std::string) that implements operator< comparison with const char*.
+ code_ += " template<typename StringType>";
+ code_ +=
+ " int KeyCompareWithValue(const StringType& _{{FIELD_NAME}}) const "
+ "{";
+ code_ +=
+ " if ({{FIELD_NAME}}()->c_str() < _{{FIELD_NAME}}) return -1;";
+ code_ += " if (_{{FIELD_NAME}} < {{FIELD_NAME}}()->c_str()) return 1;";
+ code_ += " return 0;";
} else if (is_array) {
const auto &elem_type = field.value.type.VectorType();
std::string input_type = "::flatbuffers::Array<" +
diff --git a/contrib/libs/flatbuffers/src/idl_gen_csharp.cpp b/contrib/libs/flatbuffers/src/idl_gen_csharp.cpp
index bc84ed6643..9a4936ca20 100644
--- a/contrib/libs/flatbuffers/src/idl_gen_csharp.cpp
+++ b/contrib/libs/flatbuffers/src/idl_gen_csharp.cpp
@@ -850,7 +850,7 @@ class CSharpGenerator : public BaseGenerator {
// Force compile time error if not using the same version runtime.
code += " public static void ValidateVersion() {";
code += " FlatBufferConstants.";
- code += "FLATBUFFERS_24_3_7(); ";
+ code += "FLATBUFFERS_24_3_25(); ";
code += "}\n";
// Generate a special accessor for the table that when used as the root
diff --git a/contrib/libs/flatbuffers/src/idl_gen_java.cpp b/contrib/libs/flatbuffers/src/idl_gen_java.cpp
index 331d945984..c1ec1d6c26 100644
--- a/contrib/libs/flatbuffers/src/idl_gen_java.cpp
+++ b/contrib/libs/flatbuffers/src/idl_gen_java.cpp
@@ -701,7 +701,7 @@ class JavaGenerator : public BaseGenerator {
// Force compile time error if not using the same version runtime.
code += " public static void ValidateVersion() {";
code += " Constants.";
- code += "FLATBUFFERS_24_3_7(); ";
+ code += "FLATBUFFERS_24_3_25(); ";
code += "}\n";
// Generate a special accessor for the table that when used as the root
diff --git a/contrib/libs/flatbuffers/src/idl_gen_kotlin.cpp b/contrib/libs/flatbuffers/src/idl_gen_kotlin.cpp
index ab1433ae33..675a15c36a 100644
--- a/contrib/libs/flatbuffers/src/idl_gen_kotlin.cpp
+++ b/contrib/libs/flatbuffers/src/idl_gen_kotlin.cpp
@@ -524,7 +524,7 @@ class KotlinGenerator : public BaseGenerator {
// runtime.
GenerateFunOneLine(
writer, "validateVersion", "", "",
- [&]() { writer += "Constants.FLATBUFFERS_24_3_7()"; },
+ [&]() { writer += "Constants.FLATBUFFERS_24_3_25()"; },
options.gen_jvmstatic);
GenerateGetRootAsAccessors(namer_.Type(struct_def), writer, options);
diff --git a/contrib/libs/flatbuffers/src/idl_gen_lobster.cpp b/contrib/libs/flatbuffers/src/idl_gen_lobster.cpp
index c89e7bb461..de4e152640 100644
--- a/contrib/libs/flatbuffers/src/idl_gen_lobster.cpp
+++ b/contrib/libs/flatbuffers/src/idl_gen_lobster.cpp
@@ -145,11 +145,17 @@ class LobsterGenerator : public BaseGenerator {
code += def + "() -> " + name + ":\n ";
code += "return " + name + "{ buf_, pos_ + " + offsets + " }\n";
} else {
- code += def + "() -> " + name + "?:\n ";
+ code += def + "() -> " + name;
+ if (!field.IsRequired()) code += "?";
+ code += ":\n ";
code += std::string("let o = flatbuffers.field_") +
(field.value.type.struct_def->fixed ? "struct" : "table") +
- "(buf_, pos_, " + offsets + ")\n return if o: " + name +
- " { buf_, o } else: nil\n";
+ "(buf_, pos_, " + offsets + ")\n return ";
+ if (field.IsRequired()) {
+ code += name + " { buf_, assert o }\n";
+ } else {
+ code += "if o: " + name + " { buf_, o } else: nil\n";
+ }
}
break;
}
diff --git a/contrib/libs/flatbuffers/src/idl_gen_swift.cpp b/contrib/libs/flatbuffers/src/idl_gen_swift.cpp
index 6cd1b478ec..6ac487c557 100644
--- a/contrib/libs/flatbuffers/src/idl_gen_swift.cpp
+++ b/contrib/libs/flatbuffers/src/idl_gen_swift.cpp
@@ -1845,7 +1845,7 @@ class SwiftGenerator : public BaseGenerator {
}
std::string ValidateFunc() {
- return "static func validateVersion() { FlatBuffersVersion_24_3_7() }";
+ return "static func validateVersion() { FlatBuffersVersion_24_3_25() }";
}
std::string GenType(const Type &type,
diff --git a/contrib/libs/flatbuffers/ya.make b/contrib/libs/flatbuffers/ya.make
index f4effd0477..0240904f06 100644
--- a/contrib/libs/flatbuffers/ya.make
+++ b/contrib/libs/flatbuffers/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(24.3.7)
+VERSION(24.3.25)
-ORIGINAL_SOURCE(https://github.com/google/flatbuffers/archive/v24.3.7.tar.gz)
+ORIGINAL_SOURCE(https://github.com/google/flatbuffers/archive/v24.3.25.tar.gz)
PEERDIR(
contrib/restricted/abseil-cpp/absl/base