aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-22 12:20:41 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-22 12:20:41 -0800
commit8a66ba6c359d0a64419e7182efee1af040d5e092 (patch)
tree562de6c982b8382a51d78a40a1ab705fefa47099 /env.cpp
parentd6b5558cf2932ac32ddbc6c49482761b53765c6b (diff)
parent8a446f43ff184fad6f7aeca05fca51bb3aac2d91 (diff)
Merge branch 'event-bug-test' of git://github.com/JanKanis/fish-shell into JanKanis-event-bug-test
Diffstat (limited to 'env.cpp')
-rw-r--r--env.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/env.cpp b/env.cpp
index a1930eba..01d70d95 100644
--- a/env.cpp
+++ b/env.cpp
@@ -415,12 +415,10 @@ static void universal_callback(fish_message_type_t type,
mark_changed_exported();
event_t ev = event_t::variable_event(name);
- ev.arguments.reset(new wcstring_list_t());
- ev.arguments->push_back(L"VARIABLE");
- ev.arguments->push_back(str);
- ev.arguments->push_back(name);
+ ev.arguments.push_back(L"VARIABLE");
+ ev.arguments.push_back(str);
+ ev.arguments.push_back(name);
event_fire(&ev);
- ev.arguments.reset(NULL);
}
if (name)
@@ -961,15 +959,13 @@ int env_set(const wcstring &key, const wchar_t *val, int var_mode)
if (!is_universal)
{
event_t ev = event_t::variable_event(key);
- ev.arguments.reset(new wcstring_list_t);
- ev.arguments->push_back(L"VARIABLE");
- ev.arguments->push_back(L"SET");
- ev.arguments->push_back(key);
+ ev.arguments.push_back(L"VARIABLE");
+ ev.arguments.push_back(L"SET");
+ ev.arguments.push_back(key);
// debug( 1, L"env_set: fire events on variable %ls", key );
event_fire(&ev);
// debug( 1, L"env_set: return from event firing" );
- ev.arguments.reset(NULL);
}
react_to_variable_change(key);
@@ -1048,14 +1044,12 @@ int env_remove(const wcstring &key, int var_mode)
if (try_remove(first_node, key.c_str(), var_mode))
{
event_t ev = event_t::variable_event(key);
- ev.arguments.reset(new wcstring_list_t);
- ev.arguments->push_back(L"VARIABLE");
- ev.arguments->push_back(L"ERASE");
- ev.arguments->push_back(key);
+ ev.arguments.push_back(L"VARIABLE");
+ ev.arguments.push_back(L"ERASE");
+ ev.arguments.push_back(key);
event_fire(&ev);
- ev.arguments.reset(NULL);
erased = 1;
}
}