More work towards getting function.h off of shared_ptr

This commit is contained in:
ridiculousfish
2012-05-17 19:46:08 -07:00
parent 86645b32e1
commit da6295c428
4 changed files with 17 additions and 19 deletions

View File

@@ -273,14 +273,15 @@ int function_get_shadows( const wcstring &name )
}
const wchar_t *function_get_desc( const wcstring &name )
bool function_get_desc( const wcstring &name, wcstring *out_desc )
{
/* Empty length string goes to NULL */
shared_ptr<function_info_t> func = function_get(name);
if (func && func->description.size()) {
return _(func->description.c_str());
if (out_desc && func && ! func->description.empty()) {
out_desc->assign(_(func->description.c_str()));
return true;
} else {
return NULL;
return false;
}
}