aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdtl
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-03-19 10:04:30 +0300
committerlevlam <levlam@telegram.org>2025-03-19 10:04:30 +0300
commit4c1781d62e90f178f39bbd3d637ed87533e31e74 (patch)
tree2dd6ec1fc64e8ef1a4ae15cd934494acd96b2528 /tdtl
parent334a1ed428ba8080f7c47d04a9193ddc89e6e592 (diff)
Automatically set flags from True fields on object store.
Diffstat (limited to 'tdtl')
-rw-r--r--tdtl/td/tl/tl_generate.cpp4
-rw-r--r--tdtl/td/tl/tl_writer.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/tdtl/td/tl/tl_generate.cpp b/tdtl/td/tl/tl_generate.cpp
index fc405f1e0..20113857e 100644
--- a/tdtl/td/tl/tl_generate.cpp
+++ b/tdtl/td/tl/tl_generate.cpp
@@ -178,7 +178,7 @@ static void write_function_store(tl_outputer &out, const std::string &storer_nam
out.append(w.gen_store_function_begin(storer_name, class_name, 0, vars, storer_type));
out.append(w.gen_constructor_id_store(t->id, storer_type));
for (std::size_t i = 0; i < t->args.size(); i++) {
- out.append(w.gen_field_store(t->args[i], vars, false, storer_type));
+ out.append(w.gen_field_store(t->args[i], t->args, vars, false, storer_type));
}
out.append(w.gen_store_function_end(vars, storer_type));
@@ -266,7 +266,7 @@ static void write_constructor_store(tl_outputer &out, const std::string &storer_
out.append(w.gen_uni(result_type, vars, false));
for (std::size_t i = 0; i < t->args.size(); i++) {
// std::fprintf(stderr, "%s: %s\n", result_type->type->name.c_str(), t->name.c_str());
- out.append(w.gen_field_store(t->args[i], vars, is_flat, storer_type));
+ out.append(w.gen_field_store(t->args[i], t->args, vars, is_flat, storer_type));
}
out.append(w.gen_store_function_end(vars, storer_type));
diff --git a/tdtl/td/tl/tl_writer.h b/tdtl/td/tl/tl_writer.h
index 18df08b6f..bc50b7707 100644
--- a/tdtl/td/tl/tl_writer.h
+++ b/tdtl/td/tl/tl_writer.h
@@ -112,8 +112,8 @@ class TL_writer {
virtual std::string gen_constructor_id_store(std::int32_t id, int storer_type) const = 0;
virtual std::string gen_field_fetch(int field_num, const arg &a, std::vector<var_description> &vars, bool flat,
int parser_type) const = 0;
- virtual std::string gen_field_store(const arg &a, std::vector<var_description> &vars, bool flat,
- int storer_type) const = 0;
+ virtual std::string gen_field_store(const arg &a, const std::vector<arg> &args, std::vector<var_description> &vars,
+ bool flat, int storer_type) const = 0;
virtual std::string gen_type_fetch(const std::string &field_name, const tl_tree_type *tree_type,
const std::vector<var_description> &vars, int parser_type) const = 0;
virtual std::string gen_type_store(const std::string &field_name, const tl_tree_type *tree_type,