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

git-svn-id: svn://10.0.0.236/trunk@213165 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2006-10-05 10:53:32 +00:00
parent d410bbfc5a
commit 4e5ad63746

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