]> granicus.if.org Git - python/commitdiff
fix build without Py_DEBUG and DNDEBUG (closes #14509)
authorBenjamin Peterson <benjamin@python.org>
Mon, 9 Apr 2012 18:53:07 +0000 (14:53 -0400)
committerBenjamin Peterson <benjamin@python.org>
Mon, 9 Apr 2012 18:53:07 +0000 (14:53 -0400)
Objects/bytesobject.c
Objects/unicodeobject.c

index db93f37bacc4522856c263927fdd6b036c15eb31..a0c121ededf5653734fad5d87355dfbb6b94f662 100644 (file)
@@ -896,7 +896,9 @@ bytes_hash(PyBytesObject *a)
     register unsigned char *p;
     register long x;
 
+#ifdef Py_DEBUG
     assert(_Py_HashSecret_Initialized);
+#endif
     if (a->ob_shash != -1)
         return a->ob_shash;
     len = Py_SIZE(a);
index 2ec878f916a8ea3ae96661f7b13fdf1c20f623f7..341114f9431b9822c64b8232440dea8b90b653a7 100644 (file)
@@ -7341,7 +7341,9 @@ unicode_hash(PyUnicodeObject *self)
     Py_UNICODE *p;
     long x;
 
+#ifdef Py_DEBUG
     assert(_Py_HashSecret_Initialized);
+#endif
     if (self->hash != -1)
         return self->hash;
     len = Py_SIZE(self);