[Cython] PATCH: population of builtin types for 'isinstance' optimization
[cython.git] / Cython / Compiler / Builtin.py
index b7d3f1bf820c7d0641ff0f34f1962645b6d0e529..89ca0f97ba0c3e969f6f9da42d30534434f7dbe7 100644 (file)
@@ -83,23 +83,34 @@ builtin_function_table = [
 builtin_types_table = [
 
     ("type",    "PyType_Type",     []),
-#    ("str",     "PyBytes_Type",   []),
+
+    ("bool",    "PyBool_Type",     []),
+    ("int",     "PyInt_Type",      []),
+    ("long",    "PyLong_Type",     []),
+    ("float",   "PyFloat_Type",    []),
+    ("complex", "PyComplex_Type",  []),
+
+    ("bytes",   "PyBytes_Type",    []),
+    ("str",     "PyString_Type",   []),
     ("unicode", "PyUnicode_Type",  []),
-    ("file",    "PyFile_Type",     []),
-#    ("slice",   "PySlice_Type",    []),
-#    ("set",     "PySet_Type",      []),
-    ("frozenset", "PyFrozenSet_Type",   []),
 
     ("tuple",   "PyTuple_Type",    []),
-    
+
     ("list",    "PyList_Type",     [("append", "OO",   "i", "PyList_Append"),
                                     ("insert", "OiO",  "i", "PyList_Insert"),
                                     ("sort",   "O",    "i", "PyList_Sort"),
                                     ("reverse","O",    "i", "PyList_Reverse")]),
-                                    
+
     ("dict",    "PyDict_Type",     [("items", "O",   "O", "PyDict_Items"),
                                     ("keys",  "O",   "O", "PyDict_Keys"),
                                     ("values","O",   "O", "PyDict_Values")]),
+
+    ("set",       "PySet_Type",       []),
+    ("frozenset", "PyFrozenSet_Type", []),
+
+    ("slice",   "PySlice_Type",    []),
+    ("file",    "PyFile_Type",     []),
+
 ]
 
 builtin_structs_table = [