diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-08 19:02:25 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-08 19:02:25 -0800 |
commit | b6bc4381fb84caabb3631b654c8bb1f578657b7b (patch) | |
tree | ef5bcc660000a9dbdbdcb75ab627a0b056b499aa /function.cpp | |
parent | b3d0561c09c090a00544a24f1fcafb975a9d6915 (diff) |
Get event_t off of halloc (!)
Diffstat (limited to 'function.cpp')
-rw-r--r-- | function.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/function.cpp b/function.cpp index c7bd0a33..a09cb4a3 100644 --- a/function.cpp +++ b/function.cpp @@ -191,7 +191,7 @@ void function_add( function_data_t *data, const parser_t &parser ) for( size_t i=0; i< data->events.size(); i++ ) { - event_add_handler( data->events.at(i) ); + event_add_handler( &data->events.at(i) ); } } @@ -220,8 +220,7 @@ static bool function_remove_ignore_autoload(const wcstring &name) bool erased = (loaded_functions.erase(name) > 0); if (erased) { - event_t ev; - ev.type=EVENT_ANY; + event_t ev(EVENT_ANY); ev.function_name=name.c_str(); event_remove( &ev ); } |