summaryrefslogtreecommitdiff
path: root/modules/tools
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-07-24 16:15:38 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-07-24 16:15:38 +0200
commit19590864723d5a423b75b4f06ad7005a0a93f475 (patch)
tree6400139b548ee06c316d9b928b168c10b52690f3 /modules/tools
parent602d2557ae474636babb75cc89956452a002bd9d (diff)
Half implemented arrays. Issue being that the inner types are not
handled properly
Diffstat (limited to 'modules/tools')
-rw-r--r--modules/tools/c++/c_gen_iface.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/tools/c++/c_gen_iface.hpp b/modules/tools/c++/c_gen_iface.hpp
index 4fa881c..590ee3f 100644
--- a/modules/tools/c++/c_gen_iface.hpp
+++ b/modules/tools/c++/c_gen_iface.hpp
@@ -859,12 +859,21 @@ struct lang_bind<schema::Array<T,D>, binding::SyncC> {
}
}
{
+ auto eov = lang_bind_helper::append_string(tpe.at(id).source, " {\n\ttry{\n\t\tcpp_val = {c_val->length};\n\t}catch(const std::exception&){return saw::make_error<saw::err::out_of_memory>();}\n\n\tfor(uint64_t i = 0u; i < cpp_val.size(); ++i){\n\t\tcpp_val.at(i).set(c_val[i]);\n\t}\n\n\treturn void_t{};\n}\n");
+ if(eov.is_error()){
+ return eov;
+ }
+ }
+ {
auto eov = lang_bind_helper::append_translation_func<Schema>(tpe.at(id).source, cfg.prefix, false);
if(eov.is_error()){
return eov;
}
}
{
+ auto eov = lang_bind_helper::append_string(tpe.at(id).source, " {\n\treturn saw::make_error<saw::err::not_implemented>();\n}\n");
+ }
+ {
auto eov = lang_bind_helper::append_string(tpe.at(id).source, "\n}\n");
if(eov.is_error()){
return eov;