1. python_mirrors
  2. cpython

Commits

Christian Heimes  committed 944e862 Draft

Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
non-pydebug builds. Several extension modules now compile cleanly when
assert()s are enabled in standard builds (-DDEBUG flag).

  • Participants
  • Parent commits 5f96e46
  • Branches 3.3

Comments (0)

Files changed (6)

File Misc/NEWS

View file
 Extension Modules
 -----------------
 
+- Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
+  non-pydebug builds. Several extension modules now compile cleanly when
+  assert()s are enabled in standard builds (-DDEBUG flag).
+
 - Issue #13840: The error message produced by ctypes.create_string_buffer
   when given a Unicode string has been fixed.
 

File Modules/_json.c

View file
         }
     }
     output[chars++] = '"';
+#ifdef Py_DEBUG
     assert(_PyUnicode_CheckConsistency(rval, 1));
+#endif
     return rval;
 }
 

File Modules/md5module.c

View file
         c = (digest[i] & 0xf);
         hex_digest[j++] = Py_hexdigits[c];
     }
+#ifdef Py_DEBUG
     assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
     return retval;
 }
 

File Modules/sha1module.c

View file
         c = (digest[i] & 0xf);
         hex_digest[j++] = Py_hexdigits[c];
     }
+#ifdef Py_DEBUG
     assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
     return retval;
 }
 

File Modules/sha256module.c

View file
         c = (digest[i] & 0xf);
         hex_digest[j++] = Py_hexdigits[c];
     }
+#ifdef Py_DEBUG
     assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
     return retval;
 }
 

File Modules/sha512module.c

View file
         c = (digest[i] & 0xf);
         hex_digest[j++] = Py_hexdigits[c];
     }
+#ifdef Py_DEBUG
     assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
     return retval;
 }