mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-24 17:41:16 -03:00
Clean up event_t handling
Use shared_ptr instead of the silly killme list
This commit is contained in:
@@ -944,7 +944,7 @@ static wcstring functions_def(const wcstring &name) {
|
||||
function_get_definition(name, &def);
|
||||
event_t search(EVENT_ANY);
|
||||
search.function_name = name;
|
||||
std::vector<event_t *> ev;
|
||||
std::vector<std::shared_ptr<event_t>> ev;
|
||||
event_get(search, &ev);
|
||||
|
||||
out.append(L"function ");
|
||||
@@ -967,7 +967,7 @@ static wcstring functions_def(const wcstring &name) {
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < ev.size(); i++) {
|
||||
event_t *next = ev.at(i);
|
||||
const event_t *next = ev.at(i).get();
|
||||
switch (next->type) {
|
||||
case EVENT_SIGNAL: {
|
||||
append_format(out, L" --on-signal %ls", sig2wcs(next->param1.signal));
|
||||
|
||||
Reference in New Issue
Block a user