C-arrays of uchar/schar are also C strings
authorStefan Behnel <scoder@users.berlios.de>
Sat, 12 Feb 2011 12:48:43 +0000 (13:48 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 12 Feb 2011 12:48:43 +0000 (13:48 +0100)
Cython/Compiler/PyrexTypes.py

index 3bc6a1ffe98610924589b5b12afd10c1c08b67d6..a5bbb787e0eace26a6c7e1ac4e88e67c36bbccd1 100755 (executable)
@@ -1530,7 +1530,7 @@ class CArrayType(CType):
     def __init__(self, base_type, size):
         self.base_type = base_type
         self.size = size
-        if base_type is c_char_type:
+        if base_type in (c_char_type, c_uchar_type, c_schar_type):
             self.is_string = 1
     
     def __repr__(self):