diff options
Diffstat (limited to 'modules/tools/c++/c_gen_iface.hpp')
-rw-r--r-- | modules/tools/c++/c_gen_iface.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/tools/c++/c_gen_iface.hpp b/modules/tools/c++/c_gen_iface.hpp index a5d1de6..8bd702b 100644 --- a/modules/tools/c++/c_gen_iface.hpp +++ b/modules/tools/c++/c_gen_iface.hpp @@ -482,6 +482,27 @@ struct lang_bind<schema::Function<Input, Output>, binding::SyncC> { return eov; } } + /** + * Source + */ + { + auto eov = append_function_def(src, cfg, state, f_name); + if(eov.is_error()){ + return eov; + } + } + { + auto eov = lang_bind_helper::append_string(src, "{\n\tif(!input) return -1;\n\tif(!output) return -1;\n\t"); + if(eov.is_error()){ + return eov; + } + } + { + auto eov = lang_bind_helper::append_string(src, "return 0;\n}\n\n"); + if(eov.is_error()){ + return eov; + } + } return void_t{}; } |