Software /
code /
prosody
Comparison
util/events.lua @ 8555:4f0f5b49bb03
vairious: Add annotation when an empty environment is set [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 28 Feb 2018 20:06:26 +0100 |
parent | 8382:e5d00bf4a4d5 |
child | 8759:9e839fb4541a |
comparison
equal
deleted
inserted
replaced
8554:12a68e0d0ecf | 8555:4f0f5b49bb03 |
---|---|
13 local t_sort = table.sort; | 13 local t_sort = table.sort; |
14 local setmetatable = setmetatable; | 14 local setmetatable = setmetatable; |
15 local next = next; | 15 local next = next; |
16 | 16 |
17 local _ENV = nil; | 17 local _ENV = nil; |
18 -- luacheck: std none | |
18 | 19 |
19 local function new() | 20 local function new() |
20 -- Map event name to ordered list of handlers (lazily built): handlers[event_name] = array_of_handler_functions | 21 -- Map event name to ordered list of handlers (lazily built): handlers[event_name] = array_of_handler_functions |
21 local handlers = {}; | 22 local handlers = {}; |
22 -- Array of wrapper functions that wrap all events (nil if empty) | 23 -- Array of wrapper functions that wrap all events (nil if empty) |