This commit is contained in:
Nishi 2026-04-18 02:44:34 +09:00
commit 04c4e319c5
Signed by: nishi
GPG key ID: 27EF69B208EB9343
4 changed files with 86 additions and 13 deletions

View file

@ -494,8 +494,6 @@ static std::string function_source(xl_node_t* node) {
std::string str = get_ctype(type, 0);
strm << "return new " + str.substr(0, str.size() - 1) + "(";
} else if(type.type == "string") {
strm << "const char* _ret = ";
} else {
strm << "return (" + get_ctype(type, 0) + ")";
}
@ -544,13 +542,6 @@ static std::string function_source(xl_node_t* node) {
if(widget != NULL) strm << ", " + std::string(xl_get_attribute(widget, "name"));
}
strm << ");" << std::endl;
if(ret != NULL && type.type == "string") {
strm << "#ifdef MWCXX_USE_C_STRING" << std::endl;
strm << " return _ret;" << std::endl;
strm << "#else" << std::endl;
strm << " return MwCXX::String(_ret);" << std::endl;
strm << "#endif" << std::endl;
}
strm << "}" << std::endl;
return strm.str();