Index: compiled/bindings.ipp |
=================================================================== |
--- a/compiled/bindings.ipp |
+++ b/compiled/bindings.ipp |
@@ -452,36 +452,35 @@ namespace bindings_internal |
return result; |
} |
else |
throw std::runtime_error("Unexpected return type for " + std::string(call.name)); |
} |
const std::string wrapCall(const FunctionInfo& call) |
{ |
- char buffer[20]; |
bool hasStringArgs = false; |
std::vector<std::string> params; |
std::string prefix = "function("; |
for (int i = 0; i < call.args.size(); i++) |
{ |
- sprintf(buffer, "arg%i", i); |
+ std::string argName("arg" + std::to_string(i)); |
if (i > 0) |
prefix += ", "; |
- prefix += buffer; |
+ prefix += argName; |
if (call.args[i] == TypeCategory::STRING_REF) |
{ |
hasStringArgs = true; |
- params.push_back(std::string("createString(") + buffer + ")"); |
+ params.push_back(std::string("createString(") + argName + ")"); |
} |
else if (call.args[i] == TypeCategory::CLASS_PTR) |
- params.push_back(std::string(buffer) + "._pointer"); |
+ params.push_back(argName + "._pointer"); |
else |
- params.push_back(buffer); |
+ params.push_back(argName); |
} |
prefix += ")\n{\n"; |
std::string suffix = "}"; |
if (call.returnType != TypeCategory::VOID) |
suffix = " return result;\n" + suffix; |
if (call.returnType == TypeCategory::DEPENDENT_STRING || |