Allow a closure as an event handler. Not part of the build.

This commit is contained in:
mhammond%skippinet.com.au 2006-10-05 10:53:32 +00:00
parent 43a8cdaf19
commit 065d0c32f1

View File

@ -92,7 +92,8 @@ class EventListener:
# Although handler is already a function object, we must re-bind to
# new globals
if self.globals is not None:
f = new.function(self.func.func_code, self.globals, self.func.func_name)
f = new.function(self.func.func_code, self.globals,
self.func.func_name, self.func.func_closure)
else:
f = self.func
# Convert the raw pyxpcom object to a magic _nsdom one, that