From 2ec9a68b51dd549f13e58b82d92969e0a0000a25 Mon Sep 17 00:00:00 2001 From: gupengcheng0401 Date: Wed, 13 Aug 2025 19:26:23 +0800 Subject: [PATCH] kKeep-filenames-to-avoid-incorrect-require-casing --- ...es-to-avoid-incorrect-require-casing.patch | 34 +++++++++++++++++++ flatbuffers.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0002-kKeep-filenames-to-avoid-incorrect-require-casing.patch diff --git a/0002-kKeep-filenames-to-avoid-incorrect-require-casing.patch b/0002-kKeep-filenames-to-avoid-incorrect-require-casing.patch new file mode 100644 index 0000000..3f17159 --- /dev/null +++ b/0002-kKeep-filenames-to-avoid-incorrect-require-casing.patch @@ -0,0 +1,34 @@ +From ba4450cbdd33d14eeb1d7f85534ebd97d5486937 Mon Sep 17 00:00:00 2001 +From: gupengcheng0401 +Date: Wed, 13 Aug 2025 19:21:36 +0800 +Subject: [PATCH] kKeep filenames to avoid incorrect require casing + +--- + src/bfbs_gen_lua.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/bfbs_gen_lua.cpp b/src/bfbs_gen_lua.cpp +index 185e8596..b3da048c 100644 +--- a/src/bfbs_gen_lua.cpp ++++ b/src/bfbs_gen_lua.cpp +@@ -46,7 +46,7 @@ std::set LuaKeywords() { + } + + Namer::Config LuaDefaultConfig() { +- return { /*types=*/Case::kUpperCamel, ++ return { /*types=*/Case::kKeep, + /*constants=*/Case::kUnknown, + /*methods=*/Case::kUpperCamel, + /*functions=*/Case::kUpperCamel, +@@ -507,7 +507,7 @@ class LuaBfbsGenerator : public BaseBfbsGenerator { + + std::string GenerateMethod(const r::Field *field) const { + const r::BaseType base_type = field->type()->base_type(); +- if (IsScalar(base_type)) { return namer_.Type(GenerateType(base_type)); } ++ if (IsScalar(base_type)) { return namer_.Method(GenerateType(base_type)); } + if (IsStructOrTable(base_type)) { return "Struct"; } + return "UOffsetTRelative"; + } +-- +2.43.0.windows.1 + diff --git a/flatbuffers.spec b/flatbuffers.spec index 5b7102f..4460a47 100644 --- a/flatbuffers.spec +++ b/flatbuffers.spec @@ -2,7 +2,7 @@ Name: flatbuffers Version: 25.2.10 -Release: 2 +Release: 3 Summary: Memory efficient serialization library License: Apache-2.0 URL: https://github.com/google/flatbuffers @@ -10,6 +10,7 @@ Source0: https://github.com/google/flatbuffers/archive/v%{version}/% Source1: flatc.1 Patch0: 0001-Prevent-OOM-kills-on-corrupted-data.patch +Patch1: 0002-kKeep-filenames-to-avoid-incorrect-require-casing.patch BuildRequires: gcc-c++ cmake >= 2.8.9 BuildRequires: ninja-build BuildRequires: python3-devel @@ -134,6 +135,9 @@ cp -p %SOURCE1 %{buildroot}%{_mandir}/man1/flatc.1 %changelog +* Wed Aug 13 2025 gupengcheng - 25.2.10-3 +- lua-kKeep-filenames-to-avoid-incorrect-require-casing + * Wed Aug 13 2025 gupengcheng - 25.2.10-2 - Prevent OOM kills on corrupted data -- Gitee