Fix #431, intern() doesn't work for python strings with 0 characters.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 22 Oct 2009 04:25:12 +0000 (21:25 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 22 Oct 2009 04:25:12 +0000 (21:25 -0700)
Cython/Compiler/Builtin.py

index 64f8969c677514422b65deeb83f2a5a90b485920..69f160a1fe312530e76edc4c576adf19c7d42cbc 100644 (file)
@@ -28,7 +28,7 @@ builtin_function_table = [
     #('hex',       "",     "",      ""),
     #('id',        "",     "",      ""),
     #('input',     "",     "",      ""),
-    ('intern',     "s",    "O",     "__Pyx_InternFromString"),
+    #('intern',     "s",    "O",     "__Pyx_InternFromString"), # Doesn't work for Python str objects with null characters.
     ('isinstance', "OO",   "b",     "PyObject_IsInstance"),
     ('issubclass', "OO",   "b",     "PyObject_IsSubclass"),
     ('iter',       "O",    "O",     "PyObject_GetIter"),