delete dead code (type.is_ptr never coincides with type.is_int)
authorStefan Behnel <stefan_ml@behnel.de>
Sun, 30 Dec 2012 12:22:13 +0000 (13:22 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Sun, 30 Dec 2012 12:22:13 +0000 (13:22 +0100)
Cython/Compiler/TypeInference.py

index 1f1693a..9bfc9b9 100644 (file)
@@ -483,9 +483,9 @@ def safe_spanning_type(types, might_overflow, pos):
         # find_spanning_type() only returns 'bint' for clean boolean
         # operations without other int types, so this is safe, too
         return result_type
-    elif result_type.is_ptr and not (result_type.is_int and result_type.rank == 0):
+    elif result_type.is_ptr:
         # Any pointer except (signed|unsigned|) char* can't implicitly
-        # become a PyObject.
+        # become a PyObject, and inferring char* is now accepted, too.
         return result_type
     elif result_type.is_cpp_class:
         # These can't implicitly become Python objects either.