optimize __debug__ flag
authorStefan Behnel <stefan_ml@behnel.de>
Thu, 29 Aug 2013 19:52:33 +0000 (21:52 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Thu, 29 Aug 2013 19:52:33 +0000 (21:52 +0200)
Cython/Compiler/Builtin.py

index a66ef20..2139db8 100644 (file)
@@ -403,6 +403,9 @@ def init_builtins():
     init_builtin_structs()
     init_builtin_funcs()
     init_builtin_types()
+    builtin_scope.declare_var(
+        '__debug__', PyrexTypes.c_const_type(PyrexTypes.c_bint_type),
+        pos=None, cname='(!Py_OptimizeFlag)', is_cdef=True)
     global list_type, tuple_type, dict_type, set_type, frozenset_type
     global bytes_type, str_type, unicode_type
     global float_type, bool_type, type_type, complex_type