aboutsummaryrefslogtreecommitdiffhomepage
path: root/function.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-05-17 19:46:08 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-05-17 19:46:08 -0700
commitda6295c428271e34a9e03ce7858e12a2892dff44 (patch)
tree06075412bff755876a706ee17a336b8666f37b65 /function.cpp
parent86645b32e172301088517bfb860b2e0990b3e5ec (diff)
More work towards getting function.h off of shared_ptr
Diffstat (limited to 'function.cpp')
-rw-r--r--function.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/function.cpp b/function.cpp
index 166d30a5..ff165545 100644
--- a/function.cpp
+++ b/function.cpp
@@ -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;
}
}