I understand that there can't be a standard conversion for this, since it is a reference. But I find myself duplicating code like this:
Object set_data_layout(Object self, String value)
{
llvm::Module* m = from_ruby<llvm::Module>(self);
std::string v = value.str();
m->setDataLayout(v); // takes a const std::string&
return value;
}
Are there any other methods for wrapping methods that take string references?
|