aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-05-17 19:37:46 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-05-17 19:38:08 -0700
commit86645b32e172301088517bfb860b2e0990b3e5ec (patch)
tree3a085358e6a382074c7569b997a006f2765b7c73 /exec.cpp
parent977c585f8be898e327221911b505da577619520a (diff)
Work towards getting function.h off of shared_ptr
Diffstat (limited to 'exec.cpp')
-rw-r--r--exec.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/exec.cpp b/exec.cpp
index f8689840..92b2a476 100644
--- a/exec.cpp
+++ b/exec.cpp
@@ -787,12 +787,13 @@ void exec( parser_t &parser, job_t *j )
*/
signal_unblock();
- const wchar_t * orig_def = function_get_definition( p->argv0() );
+ wcstring orig_def;
+ function_get_definition( p->argv0(), &orig_def );
// function_get_named_arguments may trigger autoload, which deallocates the orig_def.
// We should make function_get_definition return a wcstring (but how to handle NULL...)
- if (orig_def)
- def = wcsdup(orig_def);
+ if (! orig_def.empty())
+ def = wcsdup(orig_def.c_str());
wcstring_list_t named_arguments = function_get_named_arguments( p->argv0() );
shadows = function_get_shadows( p->argv0() );