make sure we have the Py2.3 set code available when using set literals
authorStefan Behnel <scoder@users.berlios.de>
Sat, 13 Dec 2008 14:21:41 +0000 (15:21 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 13 Dec 2008 14:21:41 +0000 (15:21 +0100)
Cython/Compiler/ExprNodes.py

index 252aa508bc969c417887e06539fc670cd656f292..b84b355609c9335015f942fd5772451c9ceaa899 100644 (file)
@@ -13,6 +13,7 @@ from Nodes import Node
 import PyrexTypes
 from PyrexTypes import py_object_type, c_long_type, typecast, error_type
 from Builtin import list_type, tuple_type, set_type, dict_type, unicode_type
+import Builtin
 import Symtab
 import Options
 from Annotate import AnnotationItem
@@ -3239,6 +3240,7 @@ class SetNode(NewTempExprNode):
             self.compile_time_value_error(e)
 
     def generate_evaluation_code(self, code):
+        code.globalstate.use_utility_code(Builtin.py23_set_utility_code)
         self.allocate_temp_result(code)
         code.putln(
             "%s = PySet_New(0); %s" % (