From 4ef3dcb642b07a757d5768c2732963bca8c19870 Mon Sep 17 00:00:00 2001
From: Stefan Behnel <scoder@users.berlios.de>
Date: Sat, 30 Oct 2010 19:54:35 +0200
Subject: [PATCH] fix scope of closures that was missing a 'directives' dict,
 explicitly mark closure classes 'final'

---
 Cython/Compiler/ParseTreeTransforms.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
index 8098828a..e04b28bf 100644
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -1293,6 +1293,7 @@ class CreateClosureClasses(CythonTransform):
         func_scope.scope_class = entry
         class_scope = entry.type.scope
         class_scope.is_internal = True
+        class_scope.directives = {'final': True}
         if node.entry.scope.is_closure_scope:
             class_scope.declare_var(pos=node.pos,
                                     name=Naming.outer_scope_cname, # this could conflict?
-- 
2.26.2