diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-17 19:37:46 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-17 19:38:08 -0700 |
commit | 86645b32e172301088517bfb860b2e0990b3e5ec (patch) | |
tree | 3a085358e6a382074c7569b997a006f2765b7c73 /exec.cpp | |
parent | 977c585f8be898e327221911b505da577619520a (diff) |
Work towards getting function.h off of shared_ptr
Diffstat (limited to 'exec.cpp')
-rw-r--r-- | exec.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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() ); |