diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-17 19:46:08 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-17 19:46:08 -0700 |
commit | da6295c428271e34a9e03ce7858e12a2892dff44 (patch) | |
tree | 06075412bff755876a706ee17a336b8666f37b65 /function.cpp | |
parent | 86645b32e172301088517bfb860b2e0990b3e5ec (diff) |
More work towards getting function.h off of shared_ptr
Diffstat (limited to 'function.cpp')
-rw-r--r-- | function.cpp | 9 |
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; } } |