diff --git a/internal/tlcodegen/test/codegen_test/cpp/Makefile b/internal/tlcodegen/test/codegen_test/cpp/Makefile index 3efbd87..e4009c5 100644 --- a/internal/tlcodegen/test/codegen_test/cpp/Makefile +++ b/internal/tlcodegen/test/codegen_test/cpp/Makefile @@ -13,6 +13,7 @@ run-all-tests: mkdir -p build make run-objects-test make run-functions-test + echo "\n\033[0;32mAll tests passed!\033[0m\n" clean-build: rm -rf build diff --git a/internal/tlcodegen/test/codegen_test/cpp/tests/test_functions_bytes.cpp b/internal/tlcodegen/test/codegen_test/cpp/tests/test_functions_bytes.cpp index ef40395..fd4d89d 100644 --- a/internal/tlcodegen/test/codegen_test/cpp/tests/test_functions_bytes.cpp +++ b/internal/tlcodegen/test/codegen_test/cpp/tests/test_functions_bytes.cpp @@ -44,8 +44,6 @@ int main() { std::string used_output; if (read_result) { test_result = test_function->read_write_result(input2, output); - - output.last_release(); used_output = {reinterpret_cast(output_str.used_buffer().data()), output_str.used_buffer().size()}; if (test_result) { test_result = used_output == expected_result_output; diff --git a/internal/tlcodegen/test/codegen_test/cpp/tests/test_objects_bytes.cpp b/internal/tlcodegen/test/codegen_test/cpp/tests/test_objects_bytes.cpp index 92f25f0..c792c93 100644 --- a/internal/tlcodegen/test/codegen_test/cpp/tests/test_objects_bytes.cpp +++ b/internal/tlcodegen/test/codegen_test/cpp/tests/test_objects_bytes.cpp @@ -37,7 +37,6 @@ int main() { bool read_result = test_object->read(input); bool write_result = test_object->write(output); - output.last_release(); std::string used_output{reinterpret_cast(output_str.used_buffer().data()), output_str.used_buffer().size()}; bool test_result = write_result && read_result; if (test_result) { diff --git a/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.cpp b/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.cpp index d36c616..cf93256 100644 --- a/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.cpp +++ b/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.cpp @@ -1,4 +1,3 @@ - // Code generated by vktl/cmd/tlgen2; DO NOT EDIT. #include "basictl.h" #include "string_io.h" diff --git a/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.h b/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.h index 09b525b..7632efc 100644 --- a/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.h +++ b/internal/tlcodegen/test/gen/cases_cpp/basics/string_io.h @@ -1,4 +1,3 @@ - // Code generated by vktl/cmd/tlgen2; DO NOT EDIT. #pragma once #include "basictl.h" diff --git a/internal/tlcodegen/test/gen/cases_cpp/tl/__common_namespace/details.cpp b/internal/tlcodegen/test/gen/cases_cpp/tl/__common_namespace/details.cpp index 249496b..65085fe 100644 --- a/internal/tlcodegen/test/gen/cases_cpp/tl/__common_namespace/details.cpp +++ b/internal/tlcodegen/test/gen/cases_cpp/tl/__common_namespace/details.cpp @@ -502,21 +502,25 @@ bool tl2::True::write_json(std::ostream& s)const { bool tl2::True::read(::basictl::tl_istream & s) { if (!::tl2::details::TrueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::True::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TrueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::True::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TrueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::True::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TrueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/cases_cpp/tl/benchmarks/details.cpp b/internal/tlcodegen/test/gen/cases_cpp/tl/benchmarks/details.cpp index c25efe7..bc458dc 100644 --- a/internal/tlcodegen/test/gen/cases_cpp/tl/benchmarks/details.cpp +++ b/internal/tlcodegen/test/gen/cases_cpp/tl/benchmarks/details.cpp @@ -17,21 +17,25 @@ bool tl2::benchmarks::Vruhash::write_json(std::ostream& s)const { bool tl2::benchmarks::Vruhash::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVruHashRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::Vruhash::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVruHashWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::Vruhash::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVruHashReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::Vruhash::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVruHashWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -89,21 +93,25 @@ bool tl2::benchmarks::Vruposition::write_json(std::ostream& s)const { bool tl2::benchmarks::Vruposition::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVruPositionRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::Vruposition::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVruPositionWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::Vruposition::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVruPositionReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::Vruposition::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVruPositionWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -294,21 +302,25 @@ bool tl2::benchmarks::VrutoyPositions::write_json(std::ostream& s, uint32_t nat_ bool tl2::benchmarks::VrutoyPositions::read(::basictl::tl_istream & s, uint32_t nat_n) { if (!::tl2::details::BenchmarksVrutoyPositionsRead(s, *this, nat_n)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyPositions::write(::basictl::tl_ostream & s, uint32_t nat_n)const { if (!::tl2::details::BenchmarksVrutoyPositionsWrite(s, *this, nat_n)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyPositions::read_boxed(::basictl::tl_istream & s, uint32_t nat_n) { if (!::tl2::details::BenchmarksVrutoyPositionsReadBoxed(s, *this, nat_n)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyPositions::write_boxed(::basictl::tl_ostream & s, uint32_t nat_n)const { if (!::tl2::details::BenchmarksVrutoyPositionsWriteBoxed(s, *this, nat_n)) { return false; } + s.last_release(); return true; } @@ -353,21 +365,25 @@ bool tl2::benchmarks::VrutoyTopLevelContainer::write_json(std::ostream& s)const bool tl2::benchmarks::VrutoyTopLevelContainer::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyTopLevelContainer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyTopLevelContainer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyTopLevelContainer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -410,21 +426,25 @@ bool tl2::benchmarks::VrutoyTopLevelContainerWithDependency::write_json(std::ost bool tl2::benchmarks::VrutoyTopLevelContainerWithDependency::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerWithDependencyRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyTopLevelContainerWithDependency::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerWithDependencyWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyTopLevelContainerWithDependency::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerWithDependencyReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoyTopLevelContainerWithDependency::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoyTopLevelContainerWithDependencyWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -547,21 +567,25 @@ bool tl2::benchmarks::VrutoytopLevelUnionBig::write_json(std::ostream& s)const { bool tl2::benchmarks::VrutoytopLevelUnionBig::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoytopLevelUnionBigRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoytopLevelUnionBig::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoytopLevelUnionBigWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoytopLevelUnionBig::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoytopLevelUnionBigReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoytopLevelUnionBig::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoytopLevelUnionBigWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -606,21 +630,25 @@ bool tl2::benchmarks::VrutoytopLevelUnionEmpty::write_json(std::ostream& s)const bool tl2::benchmarks::VrutoytopLevelUnionEmpty::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoytopLevelUnionEmptyRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoytopLevelUnionEmpty::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoytopLevelUnionEmptyWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoytopLevelUnionEmpty::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchmarksVrutoytopLevelUnionEmptyReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::benchmarks::VrutoytopLevelUnionEmpty::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchmarksVrutoytopLevelUnionEmptyWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/cases_cpp/tl/cases/details.cpp b/internal/tlcodegen/test/gen/cases_cpp/tl/cases/details.cpp index 3439079..eb04f20 100644 --- a/internal/tlcodegen/test/gen/cases_cpp/tl/cases/details.cpp +++ b/internal/tlcodegen/test/gen/cases_cpp/tl/cases/details.cpp @@ -192,21 +192,25 @@ bool tl2::cases::MyCycle1::write_json(std::ostream& s)const { bool tl2::cases::MyCycle1::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesMyCycle1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesMyCycle1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesMyCycle1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesMyCycle1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -270,21 +274,25 @@ bool tl2::cases::MyCycle2::write_json(std::ostream& s)const { bool tl2::cases::MyCycle2::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesMyCycle2Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle2::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesMyCycle2Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle2::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesMyCycle2ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle2::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesMyCycle2WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -348,21 +356,25 @@ bool tl2::cases::MyCycle3::write_json(std::ostream& s)const { bool tl2::cases::MyCycle3::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesMyCycle3Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle3::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesMyCycle3Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle3::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesMyCycle3ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::MyCycle3::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesMyCycle3WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -432,21 +444,25 @@ bool tl2::cases::Replace7::write_json(std::ostream& s)const { bool tl2::cases::Replace7::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesReplace7Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesReplace7Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesReplace7ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesReplace7WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -515,21 +531,25 @@ bool tl2::cases::Replace7plus::write_json(std::ostream& s)const { bool tl2::cases::Replace7plus::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesReplace7plusRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7plus::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesReplace7plusWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7plus::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesReplace7plusReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7plus::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesReplace7plusWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -604,21 +624,25 @@ bool tl2::cases::Replace7plusplus::write_json(std::ostream& s)const { bool tl2::cases::Replace7plusplus::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesReplace7plusplusRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7plusplus::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesReplace7plusplusWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7plusplus::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesReplace7plusplusReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::Replace7plusplus::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesReplace7plusplusWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -693,21 +717,25 @@ bool tl2::cases::TestAllPossibleFieldConfigs::write_json(std::ostream& s, uint32 bool tl2::cases::TestAllPossibleFieldConfigs::read(::basictl::tl_istream & s, uint32_t nat_outer) { if (!::tl2::details::CasesTestAllPossibleFieldConfigsRead(s, *this, nat_outer)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestAllPossibleFieldConfigs::write(::basictl::tl_ostream & s, uint32_t nat_outer)const { if (!::tl2::details::CasesTestAllPossibleFieldConfigsWrite(s, *this, nat_outer)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestAllPossibleFieldConfigs::read_boxed(::basictl::tl_istream & s, uint32_t nat_outer) { if (!::tl2::details::CasesTestAllPossibleFieldConfigsReadBoxed(s, *this, nat_outer)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestAllPossibleFieldConfigs::write_boxed(::basictl::tl_ostream & s, uint32_t nat_outer)const { if (!::tl2::details::CasesTestAllPossibleFieldConfigsWriteBoxed(s, *this, nat_outer)) { return false; } + s.last_release(); return true; } @@ -918,21 +946,25 @@ bool tl2::cases::TestAllPossibleFieldConfigsContainer::write_json(std::ostream& bool tl2::cases::TestAllPossibleFieldConfigsContainer::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestAllPossibleFieldConfigsContainerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestAllPossibleFieldConfigsContainer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestAllPossibleFieldConfigsContainerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestAllPossibleFieldConfigsContainer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestAllPossibleFieldConfigsContainerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestAllPossibleFieldConfigsContainer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestAllPossibleFieldConfigsContainerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -988,21 +1020,25 @@ bool tl2::cases::TestArray::write_json(std::ostream& s)const { bool tl2::cases::TestArray::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestArrayRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestArray::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestArrayWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestArray::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestArrayReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestArray::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestArrayWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1060,21 +1096,25 @@ bool tl2::cases::TestBeforeReadBitValidation::write_json(std::ostream& s)const { bool tl2::cases::TestBeforeReadBitValidation::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestBeforeReadBitValidationRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestBeforeReadBitValidation::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestBeforeReadBitValidationWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestBeforeReadBitValidation::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestBeforeReadBitValidationReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestBeforeReadBitValidation::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestBeforeReadBitValidationWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1155,21 +1195,25 @@ bool tl2::cases::TestDictAny::write_json(std::ostream& s)const { bool tl2::cases::TestDictAny::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestDictAnyRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictAny::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestDictAnyWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictAny::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestDictAnyReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictAny::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestDictAnyWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1214,21 +1258,25 @@ bool tl2::cases::TestDictInt::write_json(std::ostream& s)const { bool tl2::cases::TestDictInt::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestDictIntRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictInt::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestDictIntWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictInt::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestDictIntReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictInt::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestDictIntWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1273,21 +1321,25 @@ bool tl2::cases::TestDictString::write_json(std::ostream& s)const { bool tl2::cases::TestDictString::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestDictStringRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictString::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestDictStringWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictString::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestDictStringReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestDictString::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestDictStringWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1389,21 +1441,25 @@ bool tl2::cases::TestEnum1::write_json(std::ostream& s)const { bool tl2::cases::TestEnum1::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnum1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnum1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnum1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnum1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1440,21 +1496,25 @@ bool tl2::cases::TestEnum2::write_json(std::ostream& s)const { bool tl2::cases::TestEnum2::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnum2Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum2::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnum2Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum2::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnum2ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum2::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnum2WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1491,21 +1551,25 @@ bool tl2::cases::TestEnum3::write_json(std::ostream& s)const { bool tl2::cases::TestEnum3::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnum3Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum3::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnum3Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum3::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnum3ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnum3::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnum3WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1542,21 +1606,25 @@ bool tl2::cases::TestEnumContainer::write_json(std::ostream& s)const { bool tl2::cases::TestEnumContainer::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnumContainerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnumContainer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnumContainerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnumContainer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestEnumContainerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestEnumContainer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestEnumContainerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1599,21 +1667,25 @@ bool tl2::cases::TestLocalFieldmask::write_json(std::ostream& s)const { bool tl2::cases::TestLocalFieldmask::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestLocalFieldmaskRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestLocalFieldmask::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestLocalFieldmaskWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestLocalFieldmask::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestLocalFieldmaskReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestLocalFieldmask::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestLocalFieldmaskWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1711,21 +1783,25 @@ bool tl2::cases::TestMaybe::write_json(std::ostream& s)const { bool tl2::cases::TestMaybe::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestMaybeRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestMaybe::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestMaybeWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestMaybe::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestMaybeReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestMaybe::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestMaybeWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1770,21 +1846,25 @@ bool tl2::cases::TestOutFieldMask::write_json(std::ostream& s, uint32_t nat_f)co bool tl2::cases::TestOutFieldMask::read(::basictl::tl_istream & s, uint32_t nat_f) { if (!::tl2::details::CasesTestOutFieldMaskRead(s, *this, nat_f)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestOutFieldMask::write(::basictl::tl_ostream & s, uint32_t nat_f)const { if (!::tl2::details::CasesTestOutFieldMaskWrite(s, *this, nat_f)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestOutFieldMask::read_boxed(::basictl::tl_istream & s, uint32_t nat_f) { if (!::tl2::details::CasesTestOutFieldMaskReadBoxed(s, *this, nat_f)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestOutFieldMask::write_boxed(::basictl::tl_ostream & s, uint32_t nat_f)const { if (!::tl2::details::CasesTestOutFieldMaskWriteBoxed(s, *this, nat_f)) { return false; } + s.last_release(); return true; } @@ -1857,21 +1937,25 @@ bool tl2::cases::TestOutFieldMaskContainer::write_json(std::ostream& s)const { bool tl2::cases::TestOutFieldMaskContainer::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestOutFieldMaskContainerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestOutFieldMaskContainer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestOutFieldMaskContainerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestOutFieldMaskContainer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestOutFieldMaskContainerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestOutFieldMaskContainer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestOutFieldMaskContainerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1927,21 +2011,25 @@ bool tl2::cases::TestRecursiveFieldMask::write_json(std::ostream& s)const { bool tl2::cases::TestRecursiveFieldMask::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestRecursiveFieldmaskRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestRecursiveFieldMask::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestRecursiveFieldmaskWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestRecursiveFieldMask::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestRecursiveFieldmaskReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestRecursiveFieldMask::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestRecursiveFieldmaskWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2073,21 +2161,25 @@ bool tl2::cases::TestTuple::write_json(std::ostream& s)const { bool tl2::cases::TestTuple::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestTupleRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestTuple::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestTupleWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestTuple::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestTupleReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestTuple::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestTupleWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2205,21 +2297,25 @@ bool tl2::cases::TestUnion1::write_json(std::ostream& s)const { bool tl2::cases::TestUnion1::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestUnion1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnion1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestUnion1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnion1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestUnion1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnion1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestUnion1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2264,21 +2360,25 @@ bool tl2::cases::TestUnion2::write_json(std::ostream& s)const { bool tl2::cases::TestUnion2::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestUnion2Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnion2::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestUnion2Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnion2::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestUnion2ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnion2::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestUnion2WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2323,21 +2423,25 @@ bool tl2::cases::TestUnionContainer::write_json(std::ostream& s)const { bool tl2::cases::TestUnionContainer::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestUnionContainerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnionContainer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestUnionContainerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnionContainer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestUnionContainerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestUnionContainer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestUnionContainerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2380,21 +2484,25 @@ bool tl2::cases::TestVector::write_json(std::ostream& s)const { bool tl2::cases::TestVector::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestVectorRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestVector::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestVectorWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestVector::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesTestVectorReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases::TestVector::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesTestVectorWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/cases_cpp/tl/cases_bytes/details.cpp b/internal/tlcodegen/test/gen/cases_cpp/tl/cases_bytes/details.cpp index dbc89bc..1e713db 100644 --- a/internal/tlcodegen/test/gen/cases_cpp/tl/cases_bytes/details.cpp +++ b/internal/tlcodegen/test/gen/cases_cpp/tl/cases_bytes/details.cpp @@ -174,21 +174,25 @@ bool tl2::cases_bytes::TestArray::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestArray::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestArrayRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestArray::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestArrayWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestArray::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestArrayReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestArray::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestArrayWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -246,21 +250,25 @@ bool tl2::cases_bytes::TestDictAny::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestDictAny::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictAnyRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictAny::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictAnyWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictAny::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictAnyReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictAny::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictAnyWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -305,21 +313,25 @@ bool tl2::cases_bytes::TestDictInt::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestDictInt::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictIntRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictInt::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictIntWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictInt::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictIntReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictInt::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictIntWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -364,21 +376,25 @@ bool tl2::cases_bytes::TestDictString::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestDictString::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictStringRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictString::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictStringWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictString::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictStringReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictString::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictStringWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -423,21 +439,25 @@ bool tl2::cases_bytes::TestDictStringString::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestDictStringString::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictStringStringRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictStringString::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictStringStringWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictStringString::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestDictStringStringReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestDictStringString::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestDictStringStringWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -539,21 +559,25 @@ bool tl2::cases_bytes::TestEnum1::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestEnum1::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnum1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnum1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnum1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnum1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -590,21 +614,25 @@ bool tl2::cases_bytes::TestEnum2::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestEnum2::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnum2Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum2::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnum2Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum2::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnum2ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum2::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnum2WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -641,21 +669,25 @@ bool tl2::cases_bytes::TestEnum3::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestEnum3::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnum3Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum3::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnum3Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum3::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnum3ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnum3::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnum3WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -692,21 +724,25 @@ bool tl2::cases_bytes::TestEnumContainer::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestEnumContainer::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnumContainerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnumContainer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnumContainerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnumContainer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestEnumContainerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestEnumContainer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestEnumContainerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -749,21 +785,25 @@ bool tl2::cases_bytes::TestTuple::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestTuple::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestTupleRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestTuple::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestTupleWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestTuple::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestTupleReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestTuple::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestTupleWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -806,21 +846,25 @@ bool tl2::cases_bytes::TestVector::write_json(std::ostream& s)const { bool tl2::cases_bytes::TestVector::read(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestVectorRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestVector::write(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestVectorWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestVector::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::CasesBytesTestVectorReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::cases_bytes::TestVector::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::CasesBytesTestVectorWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.cpp b/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.cpp index d36c616..cf93256 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.cpp @@ -1,4 +1,3 @@ - // Code generated by vktl/cmd/tlgen2; DO NOT EDIT. #include "basictl.h" #include "string_io.h" diff --git a/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.h b/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.h index 09b525b..7632efc 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.h +++ b/internal/tlcodegen/test/gen/schema_cpp/basics/string_io.h @@ -1,4 +1,3 @@ - // Code generated by vktl/cmd/tlgen2; DO NOT EDIT. #pragma once #include "basictl.h" diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/__common_namespace/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/__common_namespace/details.cpp index 6f8c6ce..2c21144 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/__common_namespace/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/__common_namespace/details.cpp @@ -75,21 +75,25 @@ bool tl2::BenchObject::write_json(std::ostream& s)const { bool tl2::BenchObject::read(::basictl::tl_istream & s) { if (!::tl2::details::BenchObjectRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BenchObject::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchObjectWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BenchObject::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BenchObjectReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BenchObject::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BenchObjectWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -164,21 +168,25 @@ bool tl2::BoxedArray::write_json(std::ostream& s)const { bool tl2::BoxedArray::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedArrayRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedArray::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedArrayWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedArray::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedArrayReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedArray::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedArrayWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -224,10 +232,18 @@ bool tl2::details::BoxedArrayWriteResult(::basictl::tl_ostream & s, tl2::BoxedAr } bool tl2::BoxedArray::read_result(::basictl::tl_istream & s, ::tl2::MyBoxedArray & result) { - return tl2::details::BoxedArrayReadResult(s, *this, result); + auto read_result = tl2::details::BoxedArrayReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedArray::write_result(::basictl::tl_ostream & s, ::tl2::MyBoxedArray & result) { - return tl2::details::BoxedArrayWriteResult(s, *this, result); + auto write_result = tl2::details::BoxedArrayWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedInt::write_json(std::ostream& s)const { @@ -237,21 +253,25 @@ bool tl2::BoxedInt::write_json(std::ostream& s)const { bool tl2::BoxedInt::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedIntRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedInt::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedIntWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedInt::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedIntReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedInt::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedIntWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -303,10 +323,18 @@ bool tl2::details::BoxedIntWriteResult(::basictl::tl_ostream & s, tl2::BoxedInt& } bool tl2::BoxedInt::read_result(::basictl::tl_istream & s, int32_t & result) { - return tl2::details::BoxedIntReadResult(s, *this, result); + auto read_result = tl2::details::BoxedIntReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedInt::write_result(::basictl::tl_ostream & s, int32_t & result) { - return tl2::details::BoxedIntWriteResult(s, *this, result); + auto write_result = tl2::details::BoxedIntWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedString::write_json(std::ostream& s)const { @@ -316,21 +344,25 @@ bool tl2::BoxedString::write_json(std::ostream& s)const { bool tl2::BoxedString::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedStringRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedString::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedStringWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedString::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedStringReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedString::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedStringWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -382,10 +414,18 @@ bool tl2::details::BoxedStringWriteResult(::basictl::tl_ostream & s, tl2::BoxedS } bool tl2::BoxedString::read_result(::basictl::tl_istream & s, std::string & result) { - return tl2::details::BoxedStringReadResult(s, *this, result); + auto read_result = tl2::details::BoxedStringReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedString::write_result(::basictl::tl_ostream & s, std::string & result) { - return tl2::details::BoxedStringWriteResult(s, *this, result); + auto write_result = tl2::details::BoxedStringWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedTuple::write_json(std::ostream& s)const { @@ -395,21 +435,25 @@ bool tl2::BoxedTuple::write_json(std::ostream& s)const { bool tl2::BoxedTuple::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTuple::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTuple::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTuple::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -459,10 +503,18 @@ bool tl2::details::BoxedTupleWriteResult(::basictl::tl_ostream & s, tl2::BoxedTu } bool tl2::BoxedTuple::read_result(::basictl::tl_istream & s, std::array & result) { - return tl2::details::BoxedTupleReadResult(s, *this, result); + auto read_result = tl2::details::BoxedTupleReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedTuple::write_result(::basictl::tl_ostream & s, std::array & result) { - return tl2::details::BoxedTupleWriteResult(s, *this, result); + auto write_result = tl2::details::BoxedTupleWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedTupleSlice1::write_json(std::ostream& s)const { @@ -472,21 +524,25 @@ bool tl2::BoxedTupleSlice1::write_json(std::ostream& s)const { bool tl2::BoxedTupleSlice1::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleSlice1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleSlice1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleSlice1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleSlice1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -551,10 +607,18 @@ bool tl2::details::BoxedTupleSlice1WriteResult(::basictl::tl_ostream & s, tl2::B } bool tl2::BoxedTupleSlice1::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::BoxedTupleSlice1ReadResult(s, *this, result); + auto read_result = tl2::details::BoxedTupleSlice1ReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedTupleSlice1::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::BoxedTupleSlice1WriteResult(s, *this, result); + auto write_result = tl2::details::BoxedTupleSlice1WriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedTupleSlice2::write_json(std::ostream& s)const { @@ -564,21 +628,25 @@ bool tl2::BoxedTupleSlice2::write_json(std::ostream& s)const { bool tl2::BoxedTupleSlice2::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleSlice2Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice2::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleSlice2Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice2::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleSlice2ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice2::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleSlice2WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -624,10 +692,18 @@ bool tl2::details::BoxedTupleSlice2WriteResult(::basictl::tl_ostream & s, tl2::B } bool tl2::BoxedTupleSlice2::read_result(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice & result) { - return tl2::details::BoxedTupleSlice2ReadResult(s, *this, result); + auto read_result = tl2::details::BoxedTupleSlice2ReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedTupleSlice2::write_result(::basictl::tl_ostream & s, ::tl2::MyBoxedTupleSlice & result) { - return tl2::details::BoxedTupleSlice2WriteResult(s, *this, result); + auto write_result = tl2::details::BoxedTupleSlice2WriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedTupleSlice3::write_json(std::ostream& s)const { @@ -637,21 +713,25 @@ bool tl2::BoxedTupleSlice3::write_json(std::ostream& s)const { bool tl2::BoxedTupleSlice3::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleSlice3Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice3::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleSlice3Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice3::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedTupleSlice3ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedTupleSlice3::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedTupleSlice3WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -716,10 +796,18 @@ bool tl2::details::BoxedTupleSlice3WriteResult(::basictl::tl_ostream & s, tl2::B } bool tl2::BoxedTupleSlice3::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::BoxedTupleSlice3ReadResult(s, *this, result); + auto read_result = tl2::details::BoxedTupleSlice3ReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedTupleSlice3::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::BoxedTupleSlice3WriteResult(s, *this, result); + auto write_result = tl2::details::BoxedTupleSlice3WriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedVector32::write_json(std::ostream& s)const { @@ -729,21 +817,25 @@ bool tl2::BoxedVector32::write_json(std::ostream& s)const { bool tl2::BoxedVector32::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedVector32Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector32::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedVector32Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector32::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedVector32ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector32::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedVector32WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -795,10 +887,18 @@ bool tl2::details::BoxedVector32WriteResult(::basictl::tl_ostream & s, tl2::Boxe } bool tl2::BoxedVector32::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::BoxedVector32ReadResult(s, *this, result); + auto read_result = tl2::details::BoxedVector32ReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedVector32::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::BoxedVector32WriteResult(s, *this, result); + auto write_result = tl2::details::BoxedVector32WriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedVector32BoxedElem::write_json(std::ostream& s)const { @@ -808,21 +908,25 @@ bool tl2::BoxedVector32BoxedElem::write_json(std::ostream& s)const { bool tl2::BoxedVector32BoxedElem::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedVector32BoxedElemRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector32BoxedElem::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedVector32BoxedElemWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector32BoxedElem::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedVector32BoxedElemReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector32BoxedElem::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedVector32BoxedElemWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -874,10 +978,18 @@ bool tl2::details::BoxedVector32BoxedElemWriteResult(::basictl::tl_ostream & s, } bool tl2::BoxedVector32BoxedElem::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::BoxedVector32BoxedElemReadResult(s, *this, result); + auto read_result = tl2::details::BoxedVector32BoxedElemReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedVector32BoxedElem::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::BoxedVector32BoxedElemWriteResult(s, *this, result); + auto write_result = tl2::details::BoxedVector32BoxedElemWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::BoxedVector64::write_json(std::ostream& s)const { @@ -887,21 +999,25 @@ bool tl2::BoxedVector64::write_json(std::ostream& s)const { bool tl2::BoxedVector64::read(::basictl::tl_istream & s) { if (!::tl2::details::BoxedVector64Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector64::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedVector64Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector64::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoxedVector64ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoxedVector64::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoxedVector64WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -953,10 +1069,18 @@ bool tl2::details::BoxedVector64WriteResult(::basictl::tl_ostream & s, tl2::Boxe } bool tl2::BoxedVector64::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::BoxedVector64ReadResult(s, *this, result); + auto read_result = tl2::details::BoxedVector64ReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::BoxedVector64::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::BoxedVector64WriteResult(s, *this, result); + auto write_result = tl2::details::BoxedVector64WriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } void tl2::details::BuiltinTuple10IntBoxedReset(std::array& item) { @@ -1740,21 +1864,25 @@ bool tl2::FieldConflict1::write_json(std::ostream& s)const { bool tl2::FieldConflict1::read(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1812,21 +1940,25 @@ bool tl2::FieldConflict2::write_json(std::ostream& s)const { bool tl2::FieldConflict2::read(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict2Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict2::write(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict2Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict2::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict2ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict2::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict2WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1884,21 +2016,25 @@ bool tl2::FieldConflict3::write_json(std::ostream& s)const { bool tl2::FieldConflict3::read(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict3Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict3::write(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict3Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict3::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict3ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict3::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict3WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1956,21 +2092,25 @@ bool tl2::FieldConflict4::write_json(std::ostream& s)const { bool tl2::FieldConflict4::read(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict4Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict4::write(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict4Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict4::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::FieldConflict4ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::FieldConflict4::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::FieldConflict4WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2057,21 +2197,25 @@ bool tl2::Get_arrays::write_json(std::ostream& s)const { bool tl2::Get_arrays::read(::basictl::tl_istream & s) { if (!::tl2::details::GetArraysRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Get_arrays::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetArraysWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Get_arrays::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetArraysReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Get_arrays::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetArraysWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2143,10 +2287,18 @@ bool tl2::details::GetArraysWriteResult(::basictl::tl_ostream & s, tl2::Get_arra } bool tl2::Get_arrays::read_result(::basictl::tl_istream & s, std::array & result) { - return tl2::details::GetArraysReadResult(s, *this, result); + auto read_result = tl2::details::GetArraysReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::Get_arrays::write_result(::basictl::tl_ostream & s, std::array & result) { - return tl2::details::GetArraysWriteResult(s, *this, result); + auto write_result = tl2::details::GetArraysWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetDouble::write_json(std::ostream& s)const { @@ -2156,21 +2308,25 @@ bool tl2::GetDouble::write_json(std::ostream& s)const { bool tl2::GetDouble::read(::basictl::tl_istream & s) { if (!::tl2::details::GetDoubleRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetDouble::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetDoubleWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetDouble::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetDoubleReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetDouble::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetDoubleWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2222,10 +2378,18 @@ bool tl2::details::GetDoubleWriteResult(::basictl::tl_ostream & s, tl2::GetDoubl } bool tl2::GetDouble::read_result(::basictl::tl_istream & s, double & result) { - return tl2::details::GetDoubleReadResult(s, *this, result); + auto read_result = tl2::details::GetDoubleReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetDouble::write_result(::basictl::tl_ostream & s, double & result) { - return tl2::details::GetDoubleWriteResult(s, *this, result); + auto write_result = tl2::details::GetDoubleWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetFloat::write_json(std::ostream& s)const { @@ -2235,21 +2399,25 @@ bool tl2::GetFloat::write_json(std::ostream& s)const { bool tl2::GetFloat::read(::basictl::tl_istream & s) { if (!::tl2::details::GetFloatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetFloat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetFloatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetFloat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetFloatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetFloat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetFloatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2299,10 +2467,18 @@ bool tl2::details::GetFloatWriteResult(::basictl::tl_ostream & s, tl2::GetFloat& } bool tl2::GetFloat::read_result(::basictl::tl_istream & s, float & result) { - return tl2::details::GetFloatReadResult(s, *this, result); + auto read_result = tl2::details::GetFloatReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetFloat::write_result(::basictl::tl_ostream & s, float & result) { - return tl2::details::GetFloatWriteResult(s, *this, result); + auto write_result = tl2::details::GetFloatWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetMaybeIface::write_json(std::ostream& s)const { @@ -2312,21 +2488,25 @@ bool tl2::GetMaybeIface::write_json(std::ostream& s)const { bool tl2::GetMaybeIface::read(::basictl::tl_istream & s) { if (!::tl2::details::GetMaybeIfaceRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMaybeIface::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMaybeIfaceWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMaybeIface::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetMaybeIfaceReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMaybeIface::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMaybeIfaceWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2372,10 +2552,18 @@ bool tl2::details::GetMaybeIfaceWriteResult(::basictl::tl_ostream & s, tl2::GetM } bool tl2::GetMaybeIface::read_result(::basictl::tl_istream & s, std::optional<::tl2::service1::Value> & result) { - return tl2::details::GetMaybeIfaceReadResult(s, *this, result); + auto read_result = tl2::details::GetMaybeIfaceReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetMaybeIface::write_result(::basictl::tl_ostream & s, std::optional<::tl2::service1::Value> & result) { - return tl2::details::GetMaybeIfaceWriteResult(s, *this, result); + auto write_result = tl2::details::GetMaybeIfaceWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetMyDictOfInt::write_json(std::ostream& s)const { @@ -2385,21 +2573,25 @@ bool tl2::GetMyDictOfInt::write_json(std::ostream& s)const { bool tl2::GetMyDictOfInt::read(::basictl::tl_istream & s) { if (!::tl2::details::GetMyDictOfIntRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyDictOfInt::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMyDictOfIntWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyDictOfInt::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetMyDictOfIntReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyDictOfInt::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMyDictOfIntWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2447,10 +2639,18 @@ bool tl2::details::GetMyDictOfIntWriteResult(::basictl::tl_ostream & s, tl2::Get } bool tl2::GetMyDictOfInt::read_result(::basictl::tl_istream & s, ::tl2::MyDictOfInt & result) { - return tl2::details::GetMyDictOfIntReadResult(s, *this, result); + auto read_result = tl2::details::GetMyDictOfIntReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetMyDictOfInt::write_result(::basictl::tl_ostream & s, ::tl2::MyDictOfInt & result) { - return tl2::details::GetMyDictOfIntWriteResult(s, *this, result); + auto write_result = tl2::details::GetMyDictOfIntWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetMyDouble::write_json(std::ostream& s)const { @@ -2460,21 +2660,25 @@ bool tl2::GetMyDouble::write_json(std::ostream& s)const { bool tl2::GetMyDouble::read(::basictl::tl_istream & s) { if (!::tl2::details::GetMyDoubleRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyDouble::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMyDoubleWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyDouble::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetMyDoubleReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyDouble::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMyDoubleWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2522,10 +2726,18 @@ bool tl2::details::GetMyDoubleWriteResult(::basictl::tl_ostream & s, tl2::GetMyD } bool tl2::GetMyDouble::read_result(::basictl::tl_istream & s, ::tl2::MyDouble & result) { - return tl2::details::GetMyDoubleReadResult(s, *this, result); + auto read_result = tl2::details::GetMyDoubleReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetMyDouble::write_result(::basictl::tl_ostream & s, ::tl2::MyDouble & result) { - return tl2::details::GetMyDoubleWriteResult(s, *this, result); + auto write_result = tl2::details::GetMyDoubleWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetMyValue::write_json(std::ostream& s)const { @@ -2535,21 +2747,25 @@ bool tl2::GetMyValue::write_json(std::ostream& s)const { bool tl2::GetMyValue::read(::basictl::tl_istream & s) { if (!::tl2::details::GetMyValueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyValue::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMyValueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyValue::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetMyValueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetMyValue::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetMyValueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2595,10 +2811,18 @@ bool tl2::details::GetMyValueWriteResult(::basictl::tl_ostream & s, tl2::GetMyVa } bool tl2::GetMyValue::read_result(::basictl::tl_istream & s, ::tl2::MyValue & result) { - return tl2::details::GetMyValueReadResult(s, *this, result); + auto read_result = tl2::details::GetMyValueReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetMyValue::write_result(::basictl::tl_ostream & s, ::tl2::MyValue & result) { - return tl2::details::GetMyValueWriteResult(s, *this, result); + auto write_result = tl2::details::GetMyValueWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetNonOptNat::write_json(std::ostream& s)const { @@ -2608,21 +2832,25 @@ bool tl2::GetNonOptNat::write_json(std::ostream& s)const { bool tl2::GetNonOptNat::read(::basictl::tl_istream & s) { if (!::tl2::details::GetNonOptNatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetNonOptNat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetNonOptNatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetNonOptNat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetNonOptNatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetNonOptNat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetNonOptNatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2687,10 +2915,18 @@ bool tl2::details::GetNonOptNatWriteResult(::basictl::tl_ostream & s, tl2::GetNo } bool tl2::GetNonOptNat::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::GetNonOptNatReadResult(s, *this, result); + auto read_result = tl2::details::GetNonOptNatReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetNonOptNat::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::GetNonOptNatWriteResult(s, *this, result); + auto write_result = tl2::details::GetNonOptNatWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::GetStats::write_json(std::ostream& s)const { @@ -2700,21 +2936,25 @@ bool tl2::GetStats::write_json(std::ostream& s)const { bool tl2::GetStats::read(::basictl::tl_istream & s) { if (!::tl2::details::GetStatsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetStats::write(::basictl::tl_ostream & s)const { if (!::tl2::details::GetStatsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetStats::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::GetStatsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::GetStats::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::GetStatsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2760,10 +3000,18 @@ bool tl2::details::GetStatsWriteResult(::basictl::tl_ostream & s, tl2::GetStats& } bool tl2::GetStats::read_result(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats & result) { - return tl2::details::GetStatsReadResult(s, *this, result); + auto read_result = tl2::details::GetStatsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::GetStats::write_result(::basictl::tl_ostream & s, ::tl2::tasks::QueueTypeStats & result) { - return tl2::details::GetStatsWriteResult(s, *this, result); + auto write_result = tl2::details::GetStatsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } void tl2::details::IntReset(int32_t& item) { @@ -2836,21 +3084,25 @@ bool tl2::Integer::write_json(std::ostream& s)const { bool tl2::Integer::read(::basictl::tl_istream & s) { if (!::tl2::details::IntegerRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Integer::write(::basictl::tl_ostream & s)const { if (!::tl2::details::IntegerWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Integer::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::IntegerReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Integer::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::IntegerWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2895,21 +3147,25 @@ bool tl2::Issue3498::write_json(std::ostream& s)const { bool tl2::Issue3498::read(::basictl::tl_istream & s) { if (!::tl2::details::Issue3498Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Issue3498::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Issue3498Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Issue3498::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Issue3498ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::Issue3498::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Issue3498WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3127,21 +3383,25 @@ bool tl2::MyBoxedArray::write_json(std::ostream& s)const { bool tl2::MyBoxedArray::read(::basictl::tl_istream & s) { if (!::tl2::details::MyBoxedArrayRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedArray::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyBoxedArrayWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedArray::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyBoxedArrayReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedArray::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyBoxedArrayWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3186,21 +3446,25 @@ bool tl2::MyBoxedTupleSlice::write_json(std::ostream& s)const { bool tl2::MyBoxedTupleSlice::read(::basictl::tl_istream & s) { if (!::tl2::details::MyBoxedTupleSliceRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedTupleSlice::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyBoxedTupleSliceWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedTupleSlice::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyBoxedTupleSliceReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedTupleSlice::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyBoxedTupleSliceWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3260,21 +3524,25 @@ bool tl2::MyBoxedVectorSlice::write_json(std::ostream& s)const { bool tl2::MyBoxedVectorSlice::read(::basictl::tl_istream & s) { if (!::tl2::details::MyBoxedVectorSliceRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedVectorSlice::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyBoxedVectorSliceWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedVectorSlice::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyBoxedVectorSliceReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyBoxedVectorSlice::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyBoxedVectorSliceWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3381,21 +3649,25 @@ bool tl2::MyInt::write_json(std::ostream& s)const { bool tl2::MyInt::read(::basictl::tl_istream & s) { if (!::tl2::details::MyIntRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyInt::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyIntWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyInt::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyIntReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyInt::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyIntWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3500,21 +3772,25 @@ bool tl2::MyMcValue::write_json(std::ostream& s)const { bool tl2::MyMcValue::read(::basictl::tl_istream & s) { if (!::tl2::details::MyMcValueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValue::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyMcValueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValue::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyMcValueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValue::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyMcValueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3557,21 +3833,25 @@ bool tl2::MyMcValueTuple::write_json(std::ostream& s)const { bool tl2::MyMcValueTuple::read(::basictl::tl_istream & s) { if (!::tl2::details::MyMcValueTupleRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValueTuple::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyMcValueTupleWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValueTuple::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyMcValueTupleReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValueTuple::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyMcValueTupleWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3614,21 +3894,25 @@ bool tl2::MyMcValueVector::write_json(std::ostream& s)const { bool tl2::MyMcValueVector::read(::basictl::tl_istream & s) { if (!::tl2::details::MyMcValueVectorRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValueVector::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyMcValueVectorWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValueVector::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyMcValueVectorReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyMcValueVector::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyMcValueVectorWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3673,21 +3957,25 @@ bool tl2::MyString::write_json(std::ostream& s)const { bool tl2::MyString::read(::basictl::tl_istream & s) { if (!::tl2::details::MyStringRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyString::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyStringWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyString::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyStringReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyString::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyStringWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3797,21 +4085,25 @@ bool tl2::MyTwoDicts::write_json(std::ostream& s)const { bool tl2::MyTwoDicts::read(::basictl::tl_istream & s) { if (!::tl2::details::MyTwoDictsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyTwoDicts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::MyTwoDictsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyTwoDicts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::MyTwoDictsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::MyTwoDicts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::MyTwoDictsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3944,21 +4236,25 @@ bool tl2::NonOptNat::write_json(std::ostream& s)const { bool tl2::NonOptNat::read(::basictl::tl_istream & s) { if (!::tl2::details::NonOptNatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::NonOptNat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::NonOptNatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::NonOptNat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::NonOptNatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::NonOptNat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::NonOptNatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -4086,21 +4382,25 @@ bool tl2::RpcInvokeReqExtra::write_json(std::ostream& s)const { bool tl2::RpcInvokeReqExtra::read(::basictl::tl_istream & s) { if (!::tl2::details::RpcInvokeReqExtraRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::RpcInvokeReqExtra::write(::basictl::tl_ostream & s)const { if (!::tl2::details::RpcInvokeReqExtraWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::RpcInvokeReqExtra::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::RpcInvokeReqExtraReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::RpcInvokeReqExtra::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::RpcInvokeReqExtraWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -4232,21 +4532,25 @@ bool tl2::StatOne::write_json(std::ostream& s)const { bool tl2::StatOne::read(::basictl::tl_istream & s) { if (!::tl2::details::StatOneRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::StatOne::write(::basictl::tl_ostream & s)const { if (!::tl2::details::StatOneWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::StatOne::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::StatOneReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::StatOne::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::StatOneWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -4333,21 +4637,25 @@ bool tl2::True::write_json(std::ostream& s)const { bool tl2::True::read(::basictl::tl_istream & s) { if (!::tl2::details::TrueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::True::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TrueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::True::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TrueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::True::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TrueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -4993,21 +5301,25 @@ bool tl2::WithFloat::write_json(std::ostream& s)const { bool tl2::WithFloat::read(::basictl::tl_istream & s) { if (!::tl2::details::WithFloatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::WithFloat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::WithFloatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::WithFloat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::WithFloatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::WithFloat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::WithFloatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/antispam/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/antispam/details.cpp index 46d4288..bc4fc23 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/antispam/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/antispam/details.cpp @@ -11,21 +11,25 @@ bool tl2::antispam::GetPattern::write_json(std::ostream& s)const { bool tl2::antispam::GetPattern::read(::basictl::tl_istream & s) { if (!::tl2::details::AntispamGetPatternRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::GetPattern::write(::basictl::tl_ostream & s)const { if (!::tl2::details::AntispamGetPatternWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::GetPattern::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::AntispamGetPatternReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::GetPattern::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::AntispamGetPatternWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -73,10 +77,18 @@ bool tl2::details::AntispamGetPatternWriteResult(::basictl::tl_ostream & s, tl2: } bool tl2::antispam::GetPattern::read_result(::basictl::tl_istream & s, ::tl2::antispam::PatternFull & result) { - return tl2::details::AntispamGetPatternReadResult(s, *this, result); + auto read_result = tl2::details::AntispamGetPatternReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::antispam::GetPattern::write_result(::basictl::tl_ostream & s, ::tl2::antispam::PatternFull & result) { - return tl2::details::AntispamGetPatternWriteResult(s, *this, result); + auto write_result = tl2::details::AntispamGetPatternWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::antispam::PatternFound::write_json(std::ostream& s)const { @@ -86,21 +98,25 @@ bool tl2::antispam::PatternFound::write_json(std::ostream& s)const { bool tl2::antispam::PatternFound::read(::basictl::tl_istream & s) { if (!::tl2::details::AntispamPatternFoundRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::PatternFound::write(::basictl::tl_ostream & s)const { if (!::tl2::details::AntispamPatternFoundWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::PatternFound::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::AntispamPatternFoundReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::PatternFound::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::AntispamPatternFoundWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -258,21 +274,25 @@ bool tl2::antispam::PatternNotFound::write_json(std::ostream& s)const { bool tl2::antispam::PatternNotFound::read(::basictl::tl_istream & s) { if (!::tl2::details::AntispamPatternNotFoundRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::PatternNotFound::write(::basictl::tl_ostream & s)const { if (!::tl2::details::AntispamPatternNotFoundWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::PatternNotFound::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::AntispamPatternNotFoundReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::antispam::PatternNotFound::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::AntispamPatternNotFoundWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/pkg2/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/pkg2/details.cpp index 3422796..746ec3c 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/pkg2/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/pkg2/details.cpp @@ -10,21 +10,25 @@ bool tl2::pkg2::Foo::write_json(std::ostream& s)const { bool tl2::pkg2::Foo::read(::basictl::tl_istream & s) { if (!::tl2::details::Pkg2FooRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::pkg2::Foo::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Pkg2FooWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::pkg2::Foo::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Pkg2FooReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::pkg2::Foo::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Pkg2FooWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -69,21 +73,25 @@ bool tl2::pkg2::T1::write_json(std::ostream& s)const { bool tl2::pkg2::T1::read(::basictl::tl_istream & s) { if (!::tl2::details::Pkg2T1Read(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::pkg2::T1::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Pkg2T1Write(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::pkg2::T1::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Pkg2T1ReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::pkg2::T1::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Pkg2T1WriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/service1/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/service1/details.cpp index 533f8c2..ef2ba6b 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/service1/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/service1/details.cpp @@ -456,21 +456,25 @@ bool tl2::service1::Add::write_json(std::ostream& s)const { bool tl2::service1::Add::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1AddRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Add::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AddWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Add::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1AddReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Add::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AddWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -553,10 +557,18 @@ bool tl2::details::Service1AddWriteResult(::basictl::tl_ostream & s, tl2::servic } bool tl2::service1::Add::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1AddReadResult(s, *this, result); + auto read_result = tl2::details::Service1AddReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Add::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1AddWriteResult(s, *this, result); + auto write_result = tl2::details::Service1AddWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::AddOrGet::write_json(std::ostream& s)const { @@ -566,21 +578,25 @@ bool tl2::service1::AddOrGet::write_json(std::ostream& s)const { bool tl2::service1::AddOrGet::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1AddOrGetRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::AddOrGet::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AddOrGetWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::AddOrGet::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1AddOrGetReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::AddOrGet::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AddOrGetWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -663,10 +679,18 @@ bool tl2::details::Service1AddOrGetWriteResult(::basictl::tl_ostream & s, tl2::s } bool tl2::service1::AddOrGet::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1AddOrGetReadResult(s, *this, result); + auto read_result = tl2::details::Service1AddOrGetReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::AddOrGet::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1AddOrGetWriteResult(s, *this, result); + auto write_result = tl2::details::Service1AddOrGetWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::AddOrIncr::write_json(std::ostream& s)const { @@ -676,21 +700,25 @@ bool tl2::service1::AddOrIncr::write_json(std::ostream& s)const { bool tl2::service1::AddOrIncr::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1AddOrIncrRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::AddOrIncr::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AddOrIncrWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::AddOrIncr::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1AddOrIncrReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::AddOrIncr::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AddOrIncrWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -773,10 +801,18 @@ bool tl2::details::Service1AddOrIncrWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::service1::AddOrIncr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1AddOrIncrReadResult(s, *this, result); + auto read_result = tl2::details::Service1AddOrIncrReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::AddOrIncr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1AddOrIncrWriteResult(s, *this, result); + auto write_result = tl2::details::Service1AddOrIncrWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Append::write_json(std::ostream& s)const { @@ -786,21 +822,25 @@ bool tl2::service1::Append::write_json(std::ostream& s)const { bool tl2::service1::Append::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1AppendRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Append::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AppendWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Append::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1AppendReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Append::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1AppendWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -883,10 +923,18 @@ bool tl2::details::Service1AppendWriteResult(::basictl::tl_ostream & s, tl2::ser } bool tl2::service1::Append::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1AppendReadResult(s, *this, result); + auto read_result = tl2::details::Service1AppendReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Append::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1AppendWriteResult(s, *this, result); + auto write_result = tl2::details::Service1AppendWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Cas::write_json(std::ostream& s)const { @@ -896,21 +944,25 @@ bool tl2::service1::Cas::write_json(std::ostream& s)const { bool tl2::service1::Cas::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1CasRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Cas::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1CasWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Cas::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1CasReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Cas::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1CasWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1004,10 +1056,18 @@ bool tl2::details::Service1CasWriteResult(::basictl::tl_ostream & s, tl2::servic } bool tl2::service1::Cas::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1CasReadResult(s, *this, result); + auto read_result = tl2::details::Service1CasReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Cas::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1CasWriteResult(s, *this, result); + auto write_result = tl2::details::Service1CasWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Decr::write_json(std::ostream& s)const { @@ -1017,21 +1077,25 @@ bool tl2::service1::Decr::write_json(std::ostream& s)const { bool tl2::service1::Decr::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1DecrRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Decr::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DecrWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Decr::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1DecrReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Decr::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DecrWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1092,10 +1156,18 @@ bool tl2::details::Service1DecrWriteResult(::basictl::tl_ostream & s, tl2::servi } bool tl2::service1::Decr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1DecrReadResult(s, *this, result); + auto read_result = tl2::details::Service1DecrReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Decr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1DecrWriteResult(s, *this, result); + auto write_result = tl2::details::Service1DecrWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Delete::write_json(std::ostream& s)const { @@ -1105,21 +1177,25 @@ bool tl2::service1::Delete::write_json(std::ostream& s)const { bool tl2::service1::Delete::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1DeleteRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Delete::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DeleteWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Delete::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1DeleteReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Delete::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DeleteWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1167,10 +1243,18 @@ bool tl2::details::Service1DeleteWriteResult(::basictl::tl_ostream & s, tl2::ser } bool tl2::service1::Delete::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1DeleteReadResult(s, *this, result); + auto read_result = tl2::details::Service1DeleteReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Delete::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1DeleteWriteResult(s, *this, result); + auto write_result = tl2::details::Service1DeleteWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::DisableExpiration::write_json(std::ostream& s)const { @@ -1180,21 +1264,25 @@ bool tl2::service1::DisableExpiration::write_json(std::ostream& s)const { bool tl2::service1::DisableExpiration::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1DisableExpirationRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::DisableExpiration::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DisableExpirationWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::DisableExpiration::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1DisableExpirationReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::DisableExpiration::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DisableExpirationWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1242,10 +1330,18 @@ bool tl2::details::Service1DisableExpirationWriteResult(::basictl::tl_ostream & } bool tl2::service1::DisableExpiration::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1DisableExpirationReadResult(s, *this, result); + auto read_result = tl2::details::Service1DisableExpirationReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::DisableExpiration::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1DisableExpirationWriteResult(s, *this, result); + auto write_result = tl2::details::Service1DisableExpirationWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::DisableKeysStat::write_json(std::ostream& s)const { @@ -1255,21 +1351,25 @@ bool tl2::service1::DisableKeysStat::write_json(std::ostream& s)const { bool tl2::service1::DisableKeysStat::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1DisableKeysStatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::DisableKeysStat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DisableKeysStatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::DisableKeysStat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1DisableKeysStatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::DisableKeysStat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1DisableKeysStatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1317,10 +1417,18 @@ bool tl2::details::Service1DisableKeysStatWriteResult(::basictl::tl_ostream & s, } bool tl2::service1::DisableKeysStat::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1DisableKeysStatReadResult(s, *this, result); + auto read_result = tl2::details::Service1DisableKeysStatReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::DisableKeysStat::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1DisableKeysStatWriteResult(s, *this, result); + auto write_result = tl2::details::Service1DisableKeysStatWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::EnableExpiration::write_json(std::ostream& s)const { @@ -1330,21 +1438,25 @@ bool tl2::service1::EnableExpiration::write_json(std::ostream& s)const { bool tl2::service1::EnableExpiration::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1EnableExpirationRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::EnableExpiration::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1EnableExpirationWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::EnableExpiration::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1EnableExpirationReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::EnableExpiration::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1EnableExpirationWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1392,10 +1504,18 @@ bool tl2::details::Service1EnableExpirationWriteResult(::basictl::tl_ostream & s } bool tl2::service1::EnableExpiration::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1EnableExpirationReadResult(s, *this, result); + auto read_result = tl2::details::Service1EnableExpirationReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::EnableExpiration::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1EnableExpirationWriteResult(s, *this, result); + auto write_result = tl2::details::Service1EnableExpirationWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::EnableKeysStat::write_json(std::ostream& s)const { @@ -1405,21 +1525,25 @@ bool tl2::service1::EnableKeysStat::write_json(std::ostream& s)const { bool tl2::service1::EnableKeysStat::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1EnableKeysStatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::EnableKeysStat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1EnableKeysStatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::EnableKeysStat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1EnableKeysStatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::EnableKeysStat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1EnableKeysStatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1467,10 +1591,18 @@ bool tl2::details::Service1EnableKeysStatWriteResult(::basictl::tl_ostream & s, } bool tl2::service1::EnableKeysStat::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1EnableKeysStatReadResult(s, *this, result); + auto read_result = tl2::details::Service1EnableKeysStatReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::EnableKeysStat::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1EnableKeysStatWriteResult(s, *this, result); + auto write_result = tl2::details::Service1EnableKeysStatWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Exists::write_json(std::ostream& s)const { @@ -1480,21 +1612,25 @@ bool tl2::service1::Exists::write_json(std::ostream& s)const { bool tl2::service1::Exists::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1ExistsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Exists::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1ExistsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Exists::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1ExistsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Exists::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1ExistsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1542,10 +1678,18 @@ bool tl2::details::Service1ExistsWriteResult(::basictl::tl_ostream & s, tl2::ser } bool tl2::service1::Exists::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1ExistsReadResult(s, *this, result); + auto read_result = tl2::details::Service1ExistsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Exists::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1ExistsWriteResult(s, *this, result); + auto write_result = tl2::details::Service1ExistsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Get::write_json(std::ostream& s)const { @@ -1555,21 +1699,25 @@ bool tl2::service1::Get::write_json(std::ostream& s)const { bool tl2::service1::Get::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Get::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Get::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Get::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1617,10 +1765,18 @@ bool tl2::details::Service1GetWriteResult(::basictl::tl_ostream & s, tl2::servic } bool tl2::service1::Get::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1GetReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Get::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1GetWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetExpireTime::write_json(std::ostream& s)const { @@ -1630,21 +1786,25 @@ bool tl2::service1::GetExpireTime::write_json(std::ostream& s)const { bool tl2::service1::GetExpireTime::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetExpireTimeRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetExpireTime::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetExpireTimeWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetExpireTime::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetExpireTimeReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetExpireTime::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetExpireTimeWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1692,10 +1852,18 @@ bool tl2::details::Service1GetExpireTimeWriteResult(::basictl::tl_ostream & s, t } bool tl2::service1::GetExpireTime::read_result(::basictl::tl_istream & s, std::optional & result) { - return tl2::details::Service1GetExpireTimeReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetExpireTimeReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetExpireTime::write_result(::basictl::tl_ostream & s, std::optional & result) { - return tl2::details::Service1GetExpireTimeWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetExpireTimeWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetKeysStat::write_json(std::ostream& s)const { @@ -1705,21 +1873,25 @@ bool tl2::service1::GetKeysStat::write_json(std::ostream& s)const { bool tl2::service1::GetKeysStat::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetKeysStatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetKeysStat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetKeysStatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetKeysStat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetKeysStatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetKeysStat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetKeysStatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1767,10 +1939,18 @@ bool tl2::details::Service1GetKeysStatWriteResult(::basictl::tl_ostream & s, tl2 } bool tl2::service1::GetKeysStat::read_result(::basictl::tl_istream & s, std::optional<::tl2::service1::KeysStat> & result) { - return tl2::details::Service1GetKeysStatReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetKeysStatReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetKeysStat::write_result(::basictl::tl_ostream & s, std::optional<::tl2::service1::KeysStat> & result) { - return tl2::details::Service1GetKeysStatWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetKeysStatWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetKeysStatPeriods::write_json(std::ostream& s)const { @@ -1780,21 +1960,25 @@ bool tl2::service1::GetKeysStatPeriods::write_json(std::ostream& s)const { bool tl2::service1::GetKeysStatPeriods::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetKeysStatPeriodsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetKeysStatPeriods::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetKeysStatPeriodsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetKeysStatPeriods::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetKeysStatPeriodsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetKeysStatPeriods::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetKeysStatPeriodsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1836,10 +2020,18 @@ bool tl2::details::Service1GetKeysStatPeriodsWriteResult(::basictl::tl_ostream & } bool tl2::service1::GetKeysStatPeriods::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::Service1GetKeysStatPeriodsReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetKeysStatPeriodsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetKeysStatPeriods::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::Service1GetKeysStatPeriodsWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetKeysStatPeriodsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetWildcard::write_json(std::ostream& s)const { @@ -1849,21 +2041,25 @@ bool tl2::service1::GetWildcard::write_json(std::ostream& s)const { bool tl2::service1::GetWildcard::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcard::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcard::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcard::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1913,10 +2109,18 @@ bool tl2::details::Service1GetWildcardWriteResult(::basictl::tl_ostream & s, tl2 } bool tl2::service1::GetWildcard::read_result(::basictl::tl_istream & s, std::vector<::tl2::Map> & result) { - return tl2::details::Service1GetWildcardReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetWildcardReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetWildcard::write_result(::basictl::tl_ostream & s, std::vector<::tl2::Map> & result) { - return tl2::details::Service1GetWildcardWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetWildcardWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetWildcardDict::write_json(std::ostream& s)const { @@ -1926,21 +2130,25 @@ bool tl2::service1::GetWildcardDict::write_json(std::ostream& s)const { bool tl2::service1::GetWildcardDict::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardDictRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardDict::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardDictWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardDict::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardDictReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardDict::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardDictWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1988,10 +2196,18 @@ bool tl2::details::Service1GetWildcardDictWriteResult(::basictl::tl_ostream & s, } bool tl2::service1::GetWildcardDict::read_result(::basictl::tl_istream & s, ::tl2::Dictionary & result) { - return tl2::details::Service1GetWildcardDictReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetWildcardDictReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetWildcardDict::write_result(::basictl::tl_ostream & s, ::tl2::Dictionary & result) { - return tl2::details::Service1GetWildcardDictWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetWildcardDictWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetWildcardList::write_json(std::ostream& s)const { @@ -2001,21 +2217,25 @@ bool tl2::service1::GetWildcardList::write_json(std::ostream& s)const { bool tl2::service1::GetWildcardList::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardListRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardList::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardListWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardList::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardListReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardList::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardListWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2065,10 +2285,18 @@ bool tl2::details::Service1GetWildcardListWriteResult(::basictl::tl_ostream & s, } bool tl2::service1::GetWildcardList::read_result(::basictl::tl_istream & s, std::vector & result) { - return tl2::details::Service1GetWildcardListReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetWildcardListReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetWildcardList::write_result(::basictl::tl_ostream & s, std::vector & result) { - return tl2::details::Service1GetWildcardListWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetWildcardListWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::GetWildcardWithFlags::write_json(std::ostream& s)const { @@ -2078,21 +2306,25 @@ bool tl2::service1::GetWildcardWithFlags::write_json(std::ostream& s)const { bool tl2::service1::GetWildcardWithFlags::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardWithFlagsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardWithFlags::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardWithFlagsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardWithFlags::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1GetWildcardWithFlagsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::GetWildcardWithFlags::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1GetWildcardWithFlagsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2140,10 +2372,18 @@ bool tl2::details::Service1GetWildcardWithFlagsWriteResult(::basictl::tl_ostream } bool tl2::service1::GetWildcardWithFlags::read_result(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value> & result) { - return tl2::details::Service1GetWildcardWithFlagsReadResult(s, *this, result); + auto read_result = tl2::details::Service1GetWildcardWithFlagsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::GetWildcardWithFlags::write_result(::basictl::tl_ostream & s, ::tl2::Dictionary<::tl2::service1::Value> & result) { - return tl2::details::Service1GetWildcardWithFlagsWriteResult(s, *this, result); + auto write_result = tl2::details::Service1GetWildcardWithFlagsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Incr::write_json(std::ostream& s)const { @@ -2153,21 +2393,25 @@ bool tl2::service1::Incr::write_json(std::ostream& s)const { bool tl2::service1::Incr::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1IncrRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Incr::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1IncrWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Incr::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1IncrReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Incr::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1IncrWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2228,10 +2472,18 @@ bool tl2::details::Service1IncrWriteResult(::basictl::tl_ostream & s, tl2::servi } bool tl2::service1::Incr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1IncrReadResult(s, *this, result); + auto read_result = tl2::details::Service1IncrReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Incr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1IncrWriteResult(s, *this, result); + auto write_result = tl2::details::Service1IncrWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::KeysStat::write_json(std::ostream& s)const { @@ -2241,21 +2493,25 @@ bool tl2::service1::KeysStat::write_json(std::ostream& s)const { bool tl2::service1::KeysStat::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1KeysStatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::KeysStat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1KeysStatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::KeysStat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1KeysStatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::KeysStat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1KeysStatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2345,21 +2601,25 @@ bool tl2::service1::Longvalue::write_json(std::ostream& s)const { bool tl2::service1::Longvalue::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1LongvalueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Longvalue::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1LongvalueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Longvalue::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1LongvalueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Longvalue::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1LongvalueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2417,21 +2677,25 @@ bool tl2::service1::LongvalueWithTime::write_json(std::ostream& s)const { bool tl2::service1::LongvalueWithTime::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1LongvalueWithTimeRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::LongvalueWithTime::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1LongvalueWithTimeWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::LongvalueWithTime::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1LongvalueWithTimeReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::LongvalueWithTime::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1LongvalueWithTimeWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2500,21 +2764,25 @@ bool tl2::service1::Not_found::write_json(std::ostream& s)const { bool tl2::service1::Not_found::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1NotFoundRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Not_found::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1NotFoundWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Not_found::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1NotFoundReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Not_found::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1NotFoundWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2551,21 +2819,25 @@ bool tl2::service1::Replace::write_json(std::ostream& s)const { bool tl2::service1::Replace::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1ReplaceRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Replace::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1ReplaceWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Replace::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1ReplaceReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Replace::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1ReplaceWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2648,10 +2920,18 @@ bool tl2::details::Service1ReplaceWriteResult(::basictl::tl_ostream & s, tl2::se } bool tl2::service1::Replace::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1ReplaceReadResult(s, *this, result); + auto read_result = tl2::details::Service1ReplaceReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Replace::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1ReplaceWriteResult(s, *this, result); + auto write_result = tl2::details::Service1ReplaceWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::ReplaceOrIncr::write_json(std::ostream& s)const { @@ -2661,21 +2941,25 @@ bool tl2::service1::ReplaceOrIncr::write_json(std::ostream& s)const { bool tl2::service1::ReplaceOrIncr::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1ReplaceOrIncrRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::ReplaceOrIncr::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1ReplaceOrIncrWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::ReplaceOrIncr::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1ReplaceOrIncrReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::ReplaceOrIncr::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1ReplaceOrIncrWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2758,10 +3042,18 @@ bool tl2::details::Service1ReplaceOrIncrWriteResult(::basictl::tl_ostream & s, t } bool tl2::service1::ReplaceOrIncr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1ReplaceOrIncrReadResult(s, *this, result); + auto read_result = tl2::details::Service1ReplaceOrIncrReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::ReplaceOrIncr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1ReplaceOrIncrWriteResult(s, *this, result); + auto write_result = tl2::details::Service1ReplaceOrIncrWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Set::write_json(std::ostream& s)const { @@ -2771,21 +3063,25 @@ bool tl2::service1::Set::write_json(std::ostream& s)const { bool tl2::service1::Set::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1SetRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Set::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1SetWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Set::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1SetReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Set::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1SetWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2868,10 +3164,18 @@ bool tl2::details::Service1SetWriteResult(::basictl::tl_ostream & s, tl2::servic } bool tl2::service1::Set::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1SetReadResult(s, *this, result); + auto read_result = tl2::details::Service1SetReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Set::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1SetWriteResult(s, *this, result); + auto write_result = tl2::details::Service1SetWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::SetOrIncr::write_json(std::ostream& s)const { @@ -2881,21 +3185,25 @@ bool tl2::service1::SetOrIncr::write_json(std::ostream& s)const { bool tl2::service1::SetOrIncr::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1SetOrIncrRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::SetOrIncr::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1SetOrIncrWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::SetOrIncr::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1SetOrIncrReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::SetOrIncr::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1SetOrIncrWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2978,10 +3286,18 @@ bool tl2::details::Service1SetOrIncrWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::service1::SetOrIncr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1SetOrIncrReadResult(s, *this, result); + auto read_result = tl2::details::Service1SetOrIncrReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::SetOrIncr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { - return tl2::details::Service1SetOrIncrWriteResult(s, *this, result); + auto write_result = tl2::details::Service1SetOrIncrWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service1::Strvalue::write_json(std::ostream& s)const { @@ -2991,21 +3307,25 @@ bool tl2::service1::Strvalue::write_json(std::ostream& s)const { bool tl2::service1::Strvalue::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1StrvalueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Strvalue::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1StrvalueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Strvalue::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1StrvalueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Strvalue::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1StrvalueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3063,21 +3383,25 @@ bool tl2::service1::StrvalueWithTime::write_json(std::ostream& s)const { bool tl2::service1::StrvalueWithTime::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1StrvalueWithTimeRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::StrvalueWithTime::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1StrvalueWithTimeWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::StrvalueWithTime::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1StrvalueWithTimeReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::StrvalueWithTime::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1StrvalueWithTimeWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3146,21 +3470,25 @@ bool tl2::service1::Touch::write_json(std::ostream& s)const { bool tl2::service1::Touch::read(::basictl::tl_istream & s) { if (!::tl2::details::Service1TouchRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Touch::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1TouchWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Touch::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service1TouchReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service1::Touch::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service1TouchWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -3221,10 +3549,18 @@ bool tl2::details::Service1TouchWriteResult(::basictl::tl_ostream & s, tl2::serv } bool tl2::service1::Touch::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service1TouchReadResult(s, *this, result); + auto read_result = tl2::details::Service1TouchReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service1::Touch::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service1TouchWriteResult(s, *this, result); + auto write_result = tl2::details::Service1TouchWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } static const std::string_view Service1Value_tbl_tl_name[]{"service1.not_found", "service1.strvalue", "service1.longvalue", "service1.strvalueWithTime", "service1.longvalueWithTime"}; diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/service2/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/service2/details.cpp index 9a0d555..c0682bb 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/service2/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/service2/details.cpp @@ -137,21 +137,25 @@ bool tl2::service2::AddOrIncrMany::write_json(std::ostream& s)const { bool tl2::service2::AddOrIncrMany::read(::basictl::tl_istream & s) { if (!::tl2::details::Service2AddOrIncrManyRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::AddOrIncrMany::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service2AddOrIncrManyWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::AddOrIncrMany::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service2AddOrIncrManyReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::AddOrIncrMany::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service2AddOrIncrManyWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -269,10 +273,18 @@ bool tl2::details::Service2AddOrIncrManyWriteResult(::basictl::tl_ostream & s, t } bool tl2::service2::AddOrIncrMany::read_result(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet> & result) { - return tl2::details::Service2AddOrIncrManyReadResult(s, *this, result); + auto read_result = tl2::details::Service2AddOrIncrManyReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service2::AddOrIncrMany::write_result(::basictl::tl_ostream & s, std::vector<::tl2::service2::CounterSet> & result) { - return tl2::details::Service2AddOrIncrManyWriteResult(s, *this, result); + auto write_result = tl2::details::Service2AddOrIncrManyWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service2::CounterSet::write_json(std::ostream& s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { @@ -282,21 +294,25 @@ bool tl2::service2::CounterSet::write_json(std::ostream& s, uint32_t nat_intCoun bool tl2::service2::CounterSet::read(::basictl::tl_istream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { if (!::tl2::details::Service2CounterSetRead(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } bool tl2::service2::CounterSet::write(::basictl::tl_ostream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { if (!::tl2::details::Service2CounterSetWrite(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } bool tl2::service2::CounterSet::read_boxed(::basictl::tl_istream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { if (!::tl2::details::Service2CounterSetReadBoxed(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } bool tl2::service2::CounterSet::write_boxed(::basictl::tl_ostream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { if (!::tl2::details::Service2CounterSetWriteBoxed(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } @@ -354,21 +370,25 @@ bool tl2::service2::DeltaSet::write_json(std::ostream& s, uint32_t nat_objectIdL bool tl2::service2::DeltaSet::read(::basictl::tl_istream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { if (!::tl2::details::Service2DeltaSetRead(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } bool tl2::service2::DeltaSet::write(::basictl::tl_ostream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { if (!::tl2::details::Service2DeltaSetWrite(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } bool tl2::service2::DeltaSet::read_boxed(::basictl::tl_istream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { if (!::tl2::details::Service2DeltaSetReadBoxed(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } bool tl2::service2::DeltaSet::write_boxed(::basictl::tl_ostream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { if (!::tl2::details::Service2DeltaSetWriteBoxed(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + s.last_release(); return true; } @@ -422,21 +442,25 @@ bool tl2::service2::ObjectId::write_json(std::ostream& s, uint32_t nat_objectIdL bool tl2::service2::ObjectId::read(::basictl::tl_istream & s, uint32_t nat_objectIdLength) { if (!::tl2::details::Service2ObjectIdRead(s, *this, nat_objectIdLength)) { return false; } + s.last_release(); return true; } bool tl2::service2::ObjectId::write(::basictl::tl_ostream & s, uint32_t nat_objectIdLength)const { if (!::tl2::details::Service2ObjectIdWrite(s, *this, nat_objectIdLength)) { return false; } + s.last_release(); return true; } bool tl2::service2::ObjectId::read_boxed(::basictl::tl_istream & s, uint32_t nat_objectIdLength) { if (!::tl2::details::Service2ObjectIdReadBoxed(s, *this, nat_objectIdLength)) { return false; } + s.last_release(); return true; } bool tl2::service2::ObjectId::write_boxed(::basictl::tl_ostream & s, uint32_t nat_objectIdLength)const { if (!::tl2::details::Service2ObjectIdWriteBoxed(s, *this, nat_objectIdLength)) { return false; } + s.last_release(); return true; } @@ -481,21 +505,25 @@ bool tl2::service2::Set::write_json(std::ostream& s)const { bool tl2::service2::Set::read(::basictl::tl_istream & s) { if (!::tl2::details::Service2SetRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::Set::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service2SetWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::Set::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service2SetReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::Set::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service2SetWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -598,10 +626,18 @@ bool tl2::details::Service2SetWriteResult(::basictl::tl_ostream & s, tl2::servic } bool tl2::service2::Set::read_result(::basictl::tl_istream & s, ::tl2::True & result) { - return tl2::details::Service2SetReadResult(s, *this, result); + auto read_result = tl2::details::Service2SetReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service2::Set::write_result(::basictl::tl_ostream & s, ::tl2::True & result) { - return tl2::details::Service2SetWriteResult(s, *this, result); + auto write_result = tl2::details::Service2SetWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service2::SetObjectTtl::write_json(std::ostream& s)const { @@ -611,21 +647,25 @@ bool tl2::service2::SetObjectTtl::write_json(std::ostream& s)const { bool tl2::service2::SetObjectTtl::read(::basictl::tl_istream & s) { if (!::tl2::details::Service2SetObjectTtlRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::SetObjectTtl::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service2SetObjectTtlWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::SetObjectTtl::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service2SetObjectTtlReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service2::SetObjectTtl::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service2SetObjectTtlWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -695,10 +735,18 @@ bool tl2::details::Service2SetObjectTtlWriteResult(::basictl::tl_ostream & s, tl } bool tl2::service2::SetObjectTtl::read_result(::basictl::tl_istream & s, ::tl2::True & result) { - return tl2::details::Service2SetObjectTtlReadResult(s, *this, result); + auto read_result = tl2::details::Service2SetObjectTtlReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service2::SetObjectTtl::write_result(::basictl::tl_ostream & s, ::tl2::True & result) { - return tl2::details::Service2SetObjectTtlWriteResult(s, *this, result); + auto write_result = tl2::details::Service2SetObjectTtlWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } void tl2::details::TupleDoubleReset(std::vector& item) { diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/service3/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/service3/details.cpp index 313054c..fddf910 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/service3/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/service3/details.cpp @@ -30,21 +30,25 @@ bool tl2::BoolStat::write_json(std::ostream& s)const { bool tl2::BoolStat::read(::basictl::tl_istream & s) { if (!::tl2::details::BoolStatRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoolStat::write(::basictl::tl_ostream & s)const { if (!::tl2::details::BoolStatWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoolStat::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::BoolStatReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::BoolStat::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::BoolStatWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -298,21 +302,25 @@ bool tl2::service3::CreateProduct::write_json(std::ostream& s)const { bool tl2::service3::CreateProduct::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3CreateProductRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::CreateProduct::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3CreateProductWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::CreateProduct::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3CreateProductReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::CreateProduct::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3CreateProductWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -417,10 +425,18 @@ bool tl2::details::Service3CreateProductWriteResult(::basictl::tl_ostream & s, t } bool tl2::service3::CreateProduct::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3CreateProductReadResult(s, *this, result); + auto read_result = tl2::details::Service3CreateProductReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::CreateProduct::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3CreateProductWriteResult(s, *this, result); + auto write_result = tl2::details::Service3CreateProductWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::DeleteAllProducts::write_json(std::ostream& s)const { @@ -430,21 +446,25 @@ bool tl2::service3::DeleteAllProducts::write_json(std::ostream& s)const { bool tl2::service3::DeleteAllProducts::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3DeleteAllProductsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteAllProducts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3DeleteAllProductsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteAllProducts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3DeleteAllProductsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteAllProducts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3DeleteAllProductsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -527,10 +547,18 @@ bool tl2::details::Service3DeleteAllProductsWriteResult(::basictl::tl_ostream & } bool tl2::service3::DeleteAllProducts::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3DeleteAllProductsReadResult(s, *this, result); + auto read_result = tl2::details::Service3DeleteAllProductsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::DeleteAllProducts::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3DeleteAllProductsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3DeleteAllProductsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::DeleteGroupedProducts::write_json(std::ostream& s)const { @@ -540,21 +568,25 @@ bool tl2::service3::DeleteGroupedProducts::write_json(std::ostream& s)const { bool tl2::service3::DeleteGroupedProducts::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3DeleteGroupedProductsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteGroupedProducts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3DeleteGroupedProductsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteGroupedProducts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3DeleteGroupedProductsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteGroupedProducts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3DeleteGroupedProductsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -648,10 +680,18 @@ bool tl2::details::Service3DeleteGroupedProductsWriteResult(::basictl::tl_ostrea } bool tl2::service3::DeleteGroupedProducts::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3DeleteGroupedProductsReadResult(s, *this, result); + auto read_result = tl2::details::Service3DeleteGroupedProductsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::DeleteGroupedProducts::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3DeleteGroupedProductsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3DeleteGroupedProductsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::DeleteProduct::write_json(std::ostream& s)const { @@ -661,21 +701,25 @@ bool tl2::service3::DeleteProduct::write_json(std::ostream& s)const { bool tl2::service3::DeleteProduct::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3DeleteProductRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteProduct::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3DeleteProductWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteProduct::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3DeleteProductReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::DeleteProduct::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3DeleteProductWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -758,10 +802,18 @@ bool tl2::details::Service3DeleteProductWriteResult(::basictl::tl_ostream & s, t } bool tl2::service3::DeleteProduct::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3DeleteProductReadResult(s, *this, result); + auto read_result = tl2::details::Service3DeleteProductReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::DeleteProduct::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3DeleteProductWriteResult(s, *this, result); + auto write_result = tl2::details::Service3DeleteProductWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::GetLastVisitTimestamp::write_json(std::ostream& s)const { @@ -771,21 +823,25 @@ bool tl2::service3::GetLastVisitTimestamp::write_json(std::ostream& s)const { bool tl2::service3::GetLastVisitTimestamp::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetLastVisitTimestampRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetLastVisitTimestamp::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetLastVisitTimestampWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetLastVisitTimestamp::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetLastVisitTimestampReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetLastVisitTimestamp::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetLastVisitTimestampWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -833,10 +889,18 @@ bool tl2::details::Service3GetLastVisitTimestampWriteResult(::basictl::tl_ostrea } bool tl2::service3::GetLastVisitTimestamp::read_result(::basictl::tl_istream & s, std::optional & result) { - return tl2::details::Service3GetLastVisitTimestampReadResult(s, *this, result); + auto read_result = tl2::details::Service3GetLastVisitTimestampReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::GetLastVisitTimestamp::write_result(::basictl::tl_ostream & s, std::optional & result) { - return tl2::details::Service3GetLastVisitTimestampWriteResult(s, *this, result); + auto write_result = tl2::details::Service3GetLastVisitTimestampWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::GetLimits::write_json(std::ostream& s)const { @@ -846,21 +910,25 @@ bool tl2::service3::GetLimits::write_json(std::ostream& s)const { bool tl2::service3::GetLimits::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetLimitsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetLimits::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetLimitsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetLimits::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetLimitsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetLimits::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetLimitsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -900,10 +968,18 @@ bool tl2::details::Service3GetLimitsWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::service3::GetLimits::read_result(::basictl::tl_istream & s, ::tl2::service3::Limits & result) { - return tl2::details::Service3GetLimitsReadResult(s, *this, result); + auto read_result = tl2::details::Service3GetLimitsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::GetLimits::write_result(::basictl::tl_ostream & s, ::tl2::service3::Limits & result) { - return tl2::details::Service3GetLimitsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3GetLimitsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::GetProductStats::write_json(std::ostream& s)const { @@ -913,21 +989,25 @@ bool tl2::service3::GetProductStats::write_json(std::ostream& s)const { bool tl2::service3::GetProductStats::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetProductStatsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetProductStats::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetProductStatsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetProductStats::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetProductStatsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetProductStats::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetProductStatsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -988,10 +1068,18 @@ bool tl2::details::Service3GetProductStatsWriteResult(::basictl::tl_ostream & s, } bool tl2::service3::GetProductStats::read_result(::basictl::tl_istream & s, std::optional> & result) { - return tl2::details::Service3GetProductStatsReadResult(s, *this, result); + auto read_result = tl2::details::Service3GetProductStatsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::GetProductStats::write_result(::basictl::tl_ostream & s, std::optional> & result) { - return tl2::details::Service3GetProductStatsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3GetProductStatsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::GetProducts::write_json(std::ostream& s)const { @@ -1001,21 +1089,25 @@ bool tl2::service3::GetProducts::write_json(std::ostream& s)const { bool tl2::service3::GetProducts::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetProductsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetProducts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetProductsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetProducts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetProductsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetProducts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetProductsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1142,10 +1234,18 @@ bool tl2::details::Service3GetProductsWriteResult(::basictl::tl_ostream & s, tl2 } bool tl2::service3::GetProducts::read_result(::basictl::tl_istream & s, std::optional> & result) { - return tl2::details::Service3GetProductsReadResult(s, *this, result); + auto read_result = tl2::details::Service3GetProductsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::GetProducts::write_result(::basictl::tl_ostream & s, std::optional> & result) { - return tl2::details::Service3GetProductsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3GetProductsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::GetScheduledProducts::write_json(std::ostream& s)const { @@ -1155,21 +1255,25 @@ bool tl2::service3::GetScheduledProducts::write_json(std::ostream& s)const { bool tl2::service3::GetScheduledProducts::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetScheduledProductsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetScheduledProducts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetScheduledProductsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetScheduledProducts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GetScheduledProductsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GetScheduledProducts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GetScheduledProductsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1230,10 +1334,18 @@ bool tl2::details::Service3GetScheduledProductsWriteResult(::basictl::tl_ostream } bool tl2::service3::GetScheduledProducts::read_result(::basictl::tl_istream & s, std::optional>> & result) { - return tl2::details::Service3GetScheduledProductsReadResult(s, *this, result); + auto read_result = tl2::details::Service3GetScheduledProductsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::GetScheduledProducts::write_result(::basictl::tl_ostream & s, std::optional>> & result) { - return tl2::details::Service3GetScheduledProductsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3GetScheduledProductsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::GroupCountLimit::write_json(std::ostream& s)const { @@ -1243,21 +1355,25 @@ bool tl2::service3::GroupCountLimit::write_json(std::ostream& s)const { bool tl2::service3::GroupCountLimit::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GroupCountLimitRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GroupCountLimit::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GroupCountLimitWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GroupCountLimit::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GroupCountLimitReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GroupCountLimit::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GroupCountLimitWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1315,21 +1431,25 @@ bool tl2::service3::GroupSizeLimit::write_json(std::ostream& s)const { bool tl2::service3::GroupSizeLimit::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3GroupSizeLimitRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GroupSizeLimit::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GroupSizeLimitWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GroupSizeLimit::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3GroupSizeLimitReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::GroupSizeLimit::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3GroupSizeLimitWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1387,21 +1507,25 @@ bool tl2::service3::Limits::write_json(std::ostream& s)const { bool tl2::service3::Limits::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3LimitsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::Limits::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3LimitsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::Limits::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3LimitsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::Limits::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3LimitsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1481,21 +1605,25 @@ bool tl2::service3::Product::write_json(std::ostream& s, uint32_t nat_mode)const bool tl2::service3::Product::read(::basictl::tl_istream & s, uint32_t nat_mode) { if (!::tl2::details::Service3ProductRead(s, *this, nat_mode)) { return false; } + s.last_release(); return true; } bool tl2::service3::Product::write(::basictl::tl_ostream & s, uint32_t nat_mode)const { if (!::tl2::details::Service3ProductWrite(s, *this, nat_mode)) { return false; } + s.last_release(); return true; } bool tl2::service3::Product::read_boxed(::basictl::tl_istream & s, uint32_t nat_mode) { if (!::tl2::details::Service3ProductReadBoxed(s, *this, nat_mode)) { return false; } + s.last_release(); return true; } bool tl2::service3::Product::write_boxed(::basictl::tl_ostream & s, uint32_t nat_mode)const { if (!::tl2::details::Service3ProductWriteBoxed(s, *this, nat_mode)) { return false; } + s.last_release(); return true; } @@ -1700,21 +1828,25 @@ bool tl2::service3::ProductStatsOld::write_json(std::ostream& s)const { bool tl2::service3::ProductStatsOld::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3ProductStatsOldRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::ProductStatsOld::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3ProductStatsOldWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::ProductStatsOld::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3ProductStatsOldReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::ProductStatsOld::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3ProductStatsOldWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1805,21 +1937,25 @@ bool tl2::service3::RestoreAllProducts::write_json(std::ostream& s)const { bool tl2::service3::RestoreAllProducts::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3RestoreAllProductsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreAllProducts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3RestoreAllProductsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreAllProducts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3RestoreAllProductsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreAllProducts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3RestoreAllProductsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1902,10 +2038,18 @@ bool tl2::details::Service3RestoreAllProductsWriteResult(::basictl::tl_ostream & } bool tl2::service3::RestoreAllProducts::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3RestoreAllProductsReadResult(s, *this, result); + auto read_result = tl2::details::Service3RestoreAllProductsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::RestoreAllProducts::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3RestoreAllProductsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3RestoreAllProductsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::RestoreGroupedProducts::write_json(std::ostream& s)const { @@ -1915,21 +2059,25 @@ bool tl2::service3::RestoreGroupedProducts::write_json(std::ostream& s)const { bool tl2::service3::RestoreGroupedProducts::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3RestoreGroupedProductsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreGroupedProducts::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3RestoreGroupedProductsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreGroupedProducts::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3RestoreGroupedProductsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreGroupedProducts::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3RestoreGroupedProductsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2023,10 +2171,18 @@ bool tl2::details::Service3RestoreGroupedProductsWriteResult(::basictl::tl_ostre } bool tl2::service3::RestoreGroupedProducts::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3RestoreGroupedProductsReadResult(s, *this, result); + auto read_result = tl2::details::Service3RestoreGroupedProductsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::RestoreGroupedProducts::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3RestoreGroupedProductsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3RestoreGroupedProductsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::RestoreProduct::write_json(std::ostream& s)const { @@ -2036,21 +2192,25 @@ bool tl2::service3::RestoreProduct::write_json(std::ostream& s)const { bool tl2::service3::RestoreProduct::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3RestoreProductRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreProduct::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3RestoreProductWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreProduct::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3RestoreProductReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::RestoreProduct::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3RestoreProductWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2133,10 +2293,18 @@ bool tl2::details::Service3RestoreProductWriteResult(::basictl::tl_ostream & s, } bool tl2::service3::RestoreProduct::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3RestoreProductReadResult(s, *this, result); + auto read_result = tl2::details::Service3RestoreProductReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::RestoreProduct::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3RestoreProductWriteResult(s, *this, result); + auto write_result = tl2::details::Service3RestoreProductWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::SetLastVisitTimestamp::write_json(std::ostream& s)const { @@ -2146,21 +2314,25 @@ bool tl2::service3::SetLastVisitTimestamp::write_json(std::ostream& s)const { bool tl2::service3::SetLastVisitTimestamp::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3SetLastVisitTimestampRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::SetLastVisitTimestamp::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3SetLastVisitTimestampWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::SetLastVisitTimestamp::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3SetLastVisitTimestampReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::SetLastVisitTimestamp::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3SetLastVisitTimestampWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2221,10 +2393,18 @@ bool tl2::details::Service3SetLastVisitTimestampWriteResult(::basictl::tl_ostrea } bool tl2::service3::SetLastVisitTimestamp::read_result(::basictl::tl_istream & s, bool & result) { - return tl2::details::Service3SetLastVisitTimestampReadResult(s, *this, result); + auto read_result = tl2::details::Service3SetLastVisitTimestampReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::SetLastVisitTimestamp::write_result(::basictl::tl_ostream & s, bool & result) { - return tl2::details::Service3SetLastVisitTimestampWriteResult(s, *this, result); + auto write_result = tl2::details::Service3SetLastVisitTimestampWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service3::SetLimits::write_json(std::ostream& s)const { @@ -2234,21 +2414,25 @@ bool tl2::service3::SetLimits::write_json(std::ostream& s)const { bool tl2::service3::SetLimits::read(::basictl::tl_istream & s) { if (!::tl2::details::Service3SetLimitsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::SetLimits::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3SetLimitsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::SetLimits::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service3SetLimitsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service3::SetLimits::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service3SetLimitsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -2294,10 +2478,18 @@ bool tl2::details::Service3SetLimitsWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::service3::SetLimits::read_result(::basictl::tl_istream & s, ::tl2::BoolStat & result) { - return tl2::details::Service3SetLimitsReadResult(s, *this, result); + auto read_result = tl2::details::Service3SetLimitsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service3::SetLimits::write_result(::basictl::tl_ostream & s, ::tl2::BoolStat & result) { - return tl2::details::Service3SetLimitsWriteResult(s, *this, result); + auto write_result = tl2::details::Service3SetLimitsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } void tl2::details::VectorService3GroupCountLimitReset(std::vector<::tl2::service3::GroupCountLimit>& item) { diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/service4/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/service4/details.cpp index f2c2d25..10f6024 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/service4/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/service4/details.cpp @@ -11,21 +11,25 @@ bool tl2::service4::ModifiedNewsEntry::write_json(std::ostream& s)const { bool tl2::service4::ModifiedNewsEntry::read(::basictl::tl_istream & s) { if (!::tl2::details::Service4ModifiedNewsEntryRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service4::ModifiedNewsEntry::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service4ModifiedNewsEntryWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service4::ModifiedNewsEntry::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service4ModifiedNewsEntryReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service4::ModifiedNewsEntry::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service4ModifiedNewsEntryWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -143,21 +147,25 @@ bool tl2::service4::Object::write_json(std::ostream& s)const { bool tl2::service4::Object::read(::basictl::tl_istream & s) { if (!::tl2::details::Service4ObjectRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service4::Object::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service4ObjectWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service4::Object::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service4ObjectReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service4::Object::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service4ObjectWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/service5/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/service5/details.cpp index c61cc7b..f98b23c 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/service5/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/service5/details.cpp @@ -14,21 +14,25 @@ bool tl2::service5::EmptyOutput::write_json(std::ostream& s)const { bool tl2::service5::EmptyOutput::read(::basictl::tl_istream & s) { if (!::tl2::details::Service5EmptyOutputRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::EmptyOutput::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5EmptyOutputWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::EmptyOutput::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service5EmptyOutputReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::EmptyOutput::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5EmptyOutputWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -65,21 +69,25 @@ bool tl2::service5::Insert::write_json(std::ostream& s)const { bool tl2::service5::Insert::read(::basictl::tl_istream & s) { if (!::tl2::details::Service5InsertRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Insert::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5InsertWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Insert::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service5InsertReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Insert::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5InsertWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -140,10 +148,18 @@ bool tl2::details::Service5InsertWriteResult(::basictl::tl_ostream & s, tl2::ser } bool tl2::service5::Insert::read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result) { - return tl2::details::Service5InsertReadResult(s, *this, result); + auto read_result = tl2::details::Service5InsertReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service5::Insert::write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result) { - return tl2::details::Service5InsertWriteResult(s, *this, result); + auto write_result = tl2::details::Service5InsertWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } static const std::string_view Service5Output_tbl_tl_name[]{"service5.emptyOutput", "service5.stringOutput"}; @@ -220,21 +236,25 @@ bool tl2::service5::Params::write_json(std::ostream& s)const { bool tl2::service5::Params::read(::basictl::tl_istream & s) { if (!::tl2::details::Service5ParamsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Params::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5ParamsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Params::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service5ParamsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Params::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5ParamsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -315,21 +335,25 @@ bool tl2::service5::PerformQuery::write_json(std::ostream& s)const { bool tl2::service5::PerformQuery::read(::basictl::tl_istream & s) { if (!::tl2::details::Service5PerformQueryRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::PerformQuery::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5PerformQueryWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::PerformQuery::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service5PerformQueryReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::PerformQuery::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5PerformQueryWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -377,10 +401,18 @@ bool tl2::details::Service5PerformQueryWriteResult(::basictl::tl_ostream & s, tl } bool tl2::service5::PerformQuery::read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result) { - return tl2::details::Service5PerformQueryReadResult(s, *this, result); + auto read_result = tl2::details::Service5PerformQueryReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service5::PerformQuery::write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result) { - return tl2::details::Service5PerformQueryWriteResult(s, *this, result); + auto write_result = tl2::details::Service5PerformQueryWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service5::Query::write_json(std::ostream& s)const { @@ -390,21 +422,25 @@ bool tl2::service5::Query::write_json(std::ostream& s)const { bool tl2::service5::Query::read(::basictl::tl_istream & s) { if (!::tl2::details::Service5QueryRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Query::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5QueryWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Query::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service5QueryReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::Query::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5QueryWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -463,10 +499,18 @@ bool tl2::details::Service5QueryWriteResult(::basictl::tl_ostream & s, tl2::serv } bool tl2::service5::Query::read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result) { - return tl2::details::Service5QueryReadResult(s, *this, result); + auto read_result = tl2::details::Service5QueryReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service5::Query::write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result) { - return tl2::details::Service5QueryWriteResult(s, *this, result); + auto write_result = tl2::details::Service5QueryWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service5::StringOutput::write_json(std::ostream& s)const { @@ -476,21 +520,25 @@ bool tl2::service5::StringOutput::write_json(std::ostream& s)const { bool tl2::service5::StringOutput::read(::basictl::tl_istream & s) { if (!::tl2::details::Service5StringOutputRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::StringOutput::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5StringOutputWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::StringOutput::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service5StringOutputReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service5::StringOutput::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service5StringOutputWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/service6/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/service6/details.cpp index 7418c91..f5e6cc6 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/service6/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/service6/details.cpp @@ -88,21 +88,25 @@ bool tl2::service6::Error::write_json(std::ostream& s)const { bool tl2::service6::Error::read(::basictl::tl_istream & s) { if (!::tl2::details::Service6ErrorRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::Error::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6ErrorWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::Error::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service6ErrorReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::Error::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6ErrorWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -147,21 +151,25 @@ bool tl2::service6::FindResultRow::write_json(std::ostream& s)const { bool tl2::service6::FindResultRow::read(::basictl::tl_istream & s) { if (!::tl2::details::Service6FindResultRowRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::FindResultRow::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6FindResultRowWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::FindResultRow::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service6FindResultRowReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::FindResultRow::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6FindResultRowWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -206,21 +214,25 @@ bool tl2::service6::FindWithBoundsResult::write_json(std::ostream& s)const { bool tl2::service6::FindWithBoundsResult::read(::basictl::tl_istream & s) { if (!::tl2::details::Service6FindWithBoundsResultRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::FindWithBoundsResult::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6FindWithBoundsResultWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::FindWithBoundsResult::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service6FindWithBoundsResultReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::FindWithBoundsResult::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6FindWithBoundsResultWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -265,21 +277,25 @@ bool tl2::service6::MultiFind::write_json(std::ostream& s)const { bool tl2::service6::MultiFind::read(::basictl::tl_istream & s) { if (!::tl2::details::Service6MultiFindRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::MultiFind::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6MultiFindWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::MultiFind::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service6MultiFindReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::MultiFind::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6MultiFindWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -353,10 +369,18 @@ bool tl2::details::Service6MultiFindWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::service6::MultiFind::read_result(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> & result) { - return tl2::details::Service6MultiFindReadResult(s, *this, result); + auto read_result = tl2::details::Service6MultiFindReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service6::MultiFind::write_result(::basictl::tl_ostream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> & result) { - return tl2::details::Service6MultiFindWriteResult(s, *this, result); + auto write_result = tl2::details::Service6MultiFindWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::service6::MultiFindWithBounds::write_json(std::ostream& s)const { @@ -366,21 +390,25 @@ bool tl2::service6::MultiFindWithBounds::write_json(std::ostream& s)const { bool tl2::service6::MultiFindWithBounds::read(::basictl::tl_istream & s) { if (!::tl2::details::Service6MultiFindWithBoundsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::MultiFindWithBounds::write(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6MultiFindWithBoundsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::MultiFindWithBounds::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::Service6MultiFindWithBoundsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::service6::MultiFindWithBounds::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::Service6MultiFindWithBoundsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -430,8 +458,16 @@ bool tl2::details::Service6MultiFindWithBoundsWriteResult(::basictl::tl_ostream } bool tl2::service6::MultiFindWithBounds::read_result(::basictl::tl_istream & s, std::vector<::tl2::Either>> & result) { - return tl2::details::Service6MultiFindWithBoundsReadResult(s, *this, result); + auto read_result = tl2::details::Service6MultiFindWithBoundsReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::service6::MultiFindWithBounds::write_result(::basictl::tl_ostream & s, std::vector<::tl2::Either>> & result) { - return tl2::details::Service6MultiFindWithBoundsWriteResult(s, *this, result); + auto write_result = tl2::details::Service6MultiFindWithBoundsWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/tasks/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/tasks/details.cpp index eebf018..0bb05ae 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/tasks/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/tasks/details.cpp @@ -63,21 +63,25 @@ bool tl2::tasks::AddTask::write_json(std::ostream& s)const { bool tl2::tasks::AddTask::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksAddTaskRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::AddTask::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksAddTaskWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::AddTask::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksAddTaskReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::AddTask::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksAddTaskWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -149,10 +153,18 @@ bool tl2::details::TasksAddTaskWriteResult(::basictl::tl_ostream & s, tl2::tasks } bool tl2::tasks::AddTask::read_result(::basictl::tl_istream & s, int64_t & result) { - return tl2::details::TasksAddTaskReadResult(s, *this, result); + auto read_result = tl2::details::TasksAddTaskReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::tasks::AddTask::write_result(::basictl::tl_ostream & s, int64_t & result) { - return tl2::details::TasksAddTaskWriteResult(s, *this, result); + auto write_result = tl2::details::TasksAddTaskWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::tasks::CronTask::write_json(std::ostream& s)const { @@ -162,21 +174,25 @@ bool tl2::tasks::CronTask::write_json(std::ostream& s)const { bool tl2::tasks::CronTask::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksCronTaskRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTask::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksCronTaskWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTask::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksCronTaskReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTask::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksCronTaskWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -252,21 +268,25 @@ bool tl2::tasks::CronTaskWithId::write_json(std::ostream& s)const { bool tl2::tasks::CronTaskWithId::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksCronTaskWithIdRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTaskWithId::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksCronTaskWithIdWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTaskWithId::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksCronTaskWithIdReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTaskWithId::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksCronTaskWithIdWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -333,21 +353,25 @@ bool tl2::tasks::CronTime::write_json(std::ostream& s)const { bool tl2::tasks::CronTime::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksCronTimeRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTime::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksCronTimeWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTime::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksCronTimeReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::CronTime::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksCronTimeWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -496,21 +520,25 @@ bool tl2::tasks::GetAnyTask::write_json(std::ostream& s)const { bool tl2::tasks::GetAnyTask::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetAnyTaskRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetAnyTask::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetAnyTaskWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetAnyTask::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetAnyTaskReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetAnyTask::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetAnyTaskWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -550,10 +578,18 @@ bool tl2::details::TasksGetAnyTaskWriteResult(::basictl::tl_ostream & s, tl2::ta } bool tl2::tasks::GetAnyTask::read_result(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo> & result) { - return tl2::details::TasksGetAnyTaskReadResult(s, *this, result); + auto read_result = tl2::details::TasksGetAnyTaskReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::tasks::GetAnyTask::write_result(::basictl::tl_ostream & s, std::optional<::tl2::tasks::TaskInfo> & result) { - return tl2::details::TasksGetAnyTaskWriteResult(s, *this, result); + auto write_result = tl2::details::TasksGetAnyTaskWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::tasks::GetQueueSize::write_json(std::ostream& s)const { @@ -563,21 +599,25 @@ bool tl2::tasks::GetQueueSize::write_json(std::ostream& s)const { bool tl2::tasks::GetQueueSize::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetQueueSizeRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetQueueSize::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetQueueSizeWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetQueueSize::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetQueueSizeReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetQueueSize::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetQueueSizeWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -649,10 +689,18 @@ bool tl2::details::TasksGetQueueSizeWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::tasks::GetQueueSize::read_result(::basictl::tl_istream & s, ::tl2::tasks::QueueStats & result) { - return tl2::details::TasksGetQueueSizeReadResult(s, *this, result); + auto read_result = tl2::details::TasksGetQueueSizeReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::tasks::GetQueueSize::write_result(::basictl::tl_ostream & s, ::tl2::tasks::QueueStats & result) { - return tl2::details::TasksGetQueueSizeWriteResult(s, *this, result); + auto write_result = tl2::details::TasksGetQueueSizeWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::tasks::GetQueueTypes::write_json(std::ostream& s)const { @@ -662,21 +710,25 @@ bool tl2::tasks::GetQueueTypes::write_json(std::ostream& s)const { bool tl2::tasks::GetQueueTypes::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetQueueTypesRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetQueueTypes::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetQueueTypesWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetQueueTypes::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetQueueTypesReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetQueueTypes::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetQueueTypesWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -739,10 +791,18 @@ bool tl2::details::TasksGetQueueTypesWriteResult(::basictl::tl_ostream & s, tl2: } bool tl2::tasks::GetQueueTypes::read_result(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo> & result) { - return tl2::details::TasksGetQueueTypesReadResult(s, *this, result); + auto read_result = tl2::details::TasksGetQueueTypesReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::tasks::GetQueueTypes::write_result(::basictl::tl_ostream & s, std::vector<::tl2::tasks::QueueTypeInfo> & result) { - return tl2::details::TasksGetQueueTypesWriteResult(s, *this, result); + auto write_result = tl2::details::TasksGetQueueTypesWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::tasks::GetTaskFromQueue::write_json(std::ostream& s)const { @@ -752,21 +812,25 @@ bool tl2::tasks::GetTaskFromQueue::write_json(std::ostream& s)const { bool tl2::tasks::GetTaskFromQueue::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetTaskFromQueueRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetTaskFromQueue::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetTaskFromQueueWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetTaskFromQueue::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksGetTaskFromQueueReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::GetTaskFromQueue::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksGetTaskFromQueueWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -827,10 +891,18 @@ bool tl2::details::TasksGetTaskFromQueueWriteResult(::basictl::tl_ostream & s, t } bool tl2::tasks::GetTaskFromQueue::read_result(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo> & result) { - return tl2::details::TasksGetTaskFromQueueReadResult(s, *this, result); + auto read_result = tl2::details::TasksGetTaskFromQueueReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::tasks::GetTaskFromQueue::write_result(::basictl::tl_ostream & s, std::optional<::tl2::tasks::TaskInfo> & result) { - return tl2::details::TasksGetTaskFromQueueWriteResult(s, *this, result); + auto write_result = tl2::details::TasksGetTaskFromQueueWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::tasks::QueueStats::write_json(std::ostream& s, uint32_t nat_fields_mask)const { @@ -840,21 +912,25 @@ bool tl2::tasks::QueueStats::write_json(std::ostream& s, uint32_t nat_fields_mas bool tl2::tasks::QueueStats::read(::basictl::tl_istream & s, uint32_t nat_fields_mask) { if (!::tl2::details::TasksQueueStatsRead(s, *this, nat_fields_mask)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueStats::write(::basictl::tl_ostream & s, uint32_t nat_fields_mask)const { if (!::tl2::details::TasksQueueStatsWrite(s, *this, nat_fields_mask)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueStats::read_boxed(::basictl::tl_istream & s, uint32_t nat_fields_mask) { if (!::tl2::details::TasksQueueStatsReadBoxed(s, *this, nat_fields_mask)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueStats::write_boxed(::basictl::tl_ostream & s, uint32_t nat_fields_mask)const { if (!::tl2::details::TasksQueueStatsWriteBoxed(s, *this, nat_fields_mask)) { return false; } + s.last_release(); return true; } @@ -941,21 +1017,25 @@ bool tl2::tasks::QueueTypeInfo::write_json(std::ostream& s)const { bool tl2::tasks::QueueTypeInfo::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksQueueTypeInfoRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeInfo::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksQueueTypeInfoWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeInfo::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksQueueTypeInfoReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeInfo::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksQueueTypeInfoWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1020,21 +1100,25 @@ bool tl2::tasks::QueueTypeSettings::write_json(std::ostream& s)const { bool tl2::tasks::QueueTypeSettings::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksQueueTypeSettingsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeSettings::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksQueueTypeSettingsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeSettings::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksQueueTypeSettingsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeSettings::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksQueueTypeSettingsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1234,21 +1318,25 @@ bool tl2::tasks::QueueTypeStats::write_json(std::ostream& s)const { bool tl2::tasks::QueueTypeStats::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksQueueTypeStatsRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeStats::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksQueueTypeStatsWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeStats::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksQueueTypeStatsReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::QueueTypeStats::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksQueueTypeStatsWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1363,21 +1451,25 @@ bool tl2::tasks::Task::write_json(std::ostream& s)const { bool tl2::tasks::Task::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::Task::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::Task::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::Task::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1525,21 +1617,25 @@ bool tl2::tasks::TaskInfo::write_json(std::ostream& s)const { bool tl2::tasks::TaskInfo::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskInfoRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskInfo::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskInfoWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskInfo::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskInfoReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskInfo::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskInfoWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1698,21 +1794,25 @@ bool tl2::tasks::TaskStatusInProgress::write_json(std::ostream& s)const { bool tl2::tasks::TaskStatusInProgress::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusInProgressRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusInProgress::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusInProgressWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusInProgress::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusInProgressReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusInProgress::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusInProgressWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1749,21 +1849,25 @@ bool tl2::tasks::TaskStatusNotCurrentlyInEngine::write_json(std::ostream& s)cons bool tl2::tasks::TaskStatusNotCurrentlyInEngine::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusNotCurrentlyInEngine::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusNotCurrentlyInEngine::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusNotCurrentlyInEngine::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1800,21 +1904,25 @@ bool tl2::tasks::TaskStatusScheduled::write_json(std::ostream& s)const { bool tl2::tasks::TaskStatusScheduled::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusScheduledRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusScheduled::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusScheduledWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusScheduled::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusScheduledReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusScheduled::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusScheduledWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -1851,21 +1959,25 @@ bool tl2::tasks::TaskStatusWaiting::write_json(std::ostream& s)const { bool tl2::tasks::TaskStatusWaiting::read(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusWaitingRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusWaiting::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusWaitingWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusWaiting::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TasksTaskStatusWaitingReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tasks::TaskStatusWaiting::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TasksTaskStatusWaitingWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/tree_stats/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/tree_stats/details.cpp index fae6df2..66e7f2b 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/tree_stats/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/tree_stats/details.cpp @@ -108,21 +108,25 @@ bool tl2::tree_stats::ObjectLimitValueLong::write_json(std::ostream& s)const { bool tl2::tree_stats::ObjectLimitValueLong::read(::basictl::tl_istream & s) { if (!::tl2::details::TreeStatsObjectLimitValueLongRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tree_stats::ObjectLimitValueLong::write(::basictl::tl_ostream & s)const { if (!::tl2::details::TreeStatsObjectLimitValueLongWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tree_stats::ObjectLimitValueLong::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::TreeStatsObjectLimitValueLongReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::tree_stats::ObjectLimitValueLong::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::TreeStatsObjectLimitValueLongWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } diff --git a/internal/tlcodegen/test/gen/schema_cpp/tl/unique/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tl/unique/details.cpp index f51ea7f..309cd20 100644 --- a/internal/tlcodegen/test/gen/schema_cpp/tl/unique/details.cpp +++ b/internal/tlcodegen/test/gen/schema_cpp/tl/unique/details.cpp @@ -10,21 +10,25 @@ bool tl2::unique::Get::write_json(std::ostream& s)const { bool tl2::unique::Get::read(::basictl::tl_istream & s) { if (!::tl2::details::UniqueGetRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::unique::Get::write(::basictl::tl_ostream & s)const { if (!::tl2::details::UniqueGetWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::unique::Get::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::UniqueGetReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::unique::Get::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::UniqueGetWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -72,10 +76,18 @@ bool tl2::details::UniqueGetWriteResult(::basictl::tl_ostream & s, tl2::unique:: } bool tl2::unique::Get::read_result(::basictl::tl_istream & s, std::optional & result) { - return tl2::details::UniqueGetReadResult(s, *this, result); + auto read_result = tl2::details::UniqueGetReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::unique::Get::write_result(::basictl::tl_ostream & s, std::optional & result) { - return tl2::details::UniqueGetWriteResult(s, *this, result); + auto write_result = tl2::details::UniqueGetWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } bool tl2::unique::StringToInt::write_json(std::ostream& s)const { @@ -85,21 +97,25 @@ bool tl2::unique::StringToInt::write_json(std::ostream& s)const { bool tl2::unique::StringToInt::read(::basictl::tl_istream & s) { if (!::tl2::details::UniqueStringToIntRead(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::unique::StringToInt::write(::basictl::tl_ostream & s)const { if (!::tl2::details::UniqueStringToIntWrite(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::unique::StringToInt::read_boxed(::basictl::tl_istream & s) { if (!::tl2::details::UniqueStringToIntReadBoxed(s, *this)) { return false; } + s.last_release(); return true; } bool tl2::unique::StringToInt::write_boxed(::basictl::tl_ostream & s)const { if (!::tl2::details::UniqueStringToIntWriteBoxed(s, *this)) { return false; } + s.last_release(); return true; } @@ -149,8 +165,16 @@ bool tl2::details::UniqueStringToIntWriteResult(::basictl::tl_ostream & s, tl2:: } bool tl2::unique::StringToInt::read_result(::basictl::tl_istream & s, int32_t & result) { - return tl2::details::UniqueStringToIntReadResult(s, *this, result); + auto read_result = tl2::details::UniqueStringToIntReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool tl2::unique::StringToInt::write_result(::basictl::tl_ostream & s, int32_t & result) { - return tl2::details::UniqueStringToIntWriteResult(s, *this, result); + auto write_result = tl2::details::UniqueStringToIntWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } diff --git a/internal/tlcodegen/type_rw_struct_cpp.go b/internal/tlcodegen/type_rw_struct_cpp.go index 6309891..ea149ab 100644 --- a/internal/tlcodegen/type_rw_struct_cpp.go +++ b/internal/tlcodegen/type_rw_struct_cpp.go @@ -332,11 +332,13 @@ bool %[5]s::write_json(std::ostream& s%[1]s)const { bool %[5]s::read(::basictl::tl_istream & s%[1]s) { %[3]s + s.last_release(); return true; } bool %[5]s::write(::basictl::tl_ostream & s%[1]s)const { %[4]s + s.last_release(); return true; } `, @@ -351,11 +353,13 @@ bool %[5]s::write(::basictl::tl_ostream & s%[1]s)const { cppDet.WriteString(fmt.Sprintf(` bool %[5]s::read_boxed(::basictl::tl_istream & s%[1]s) { %[3]s + s.last_release(); return true; } bool %[5]s::write_boxed(::basictl::tl_ostream & s%[1]s)const { %[4]s + s.last_release(); return true; } `, @@ -440,10 +444,18 @@ bool %[8]s::%[6]sWriteResult(::basictl::tl_ostream & s, %[2]s& item, %[1]s& resu } bool %[2]s::read_result(::basictl::tl_istream & s, %[1]s & result) { - return %[8]s::%[6]sReadResult(s, *this, result); + auto read_result = %[8]s::%[6]sReadResult(s, *this, result); + if (read_result) { + s.last_release(); + } + return read_result; } bool %[2]s::write_result(::basictl::tl_ostream & s, %[1]s & result) { - return %[8]s::%[6]sWriteResult(s, *this, result); + auto write_result = %[8]s::%[6]sWriteResult(s, *this, result); + if (write_result) { + s.last_release(); + } + return write_result; } `, resultType,