# HG changeset patch # User Matthew Wild # Date 1430936478 -3600 # Node ID 5466f24e51c92009922ab84e3cd2d9ca53f61412 # Parent d3023dd07cb6669ba96278272f6ac06aa4cd3285 util.events: Add get_handlers() method diff -r d3023dd07cb6 -r 5466f24e51c9 util/events.lua --- a/util/events.lua Wed May 06 19:20:07 2015 +0100 +++ b/util/events.lua Wed May 06 19:21:18 2015 +0100 @@ -52,6 +52,9 @@ end end end; + local function get_handlers(event) + return handlers[event]; + end; local function add_handlers(handlers) for event, handler in pairs(handlers) do add_handler(event, handler); @@ -134,6 +137,7 @@ remove_handler = remove_handler; add_handlers = add_handlers; remove_handlers = remove_handlers; + get_handlers = get_handlers; wrappers = { add_handler = add_wrapper; remove_handler = remove_wrapper;