]> granicus.if.org Git - python/commitdiff
Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
authorChristian Heimes <christian@cheimes.de>
Tue, 30 Jul 2013 13:32:57 +0000 (15:32 +0200)
committerChristian Heimes <christian@cheimes.de>
Tue, 30 Jul 2013 13:32:57 +0000 (15:32 +0200)
'SHA1' instead of 'SHA'.

Misc/NEWS
Modules/sha1module.c

index 281ab3ed5f5593e9ca8a3c6cade410d59203b7c7..82b1081fda735bf16d16884286161eac60bad617 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -57,6 +57,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
+  'SHA1' instead of 'SHA'.
+
 - Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
 
 - Issue #18559: Fix NULL pointer dereference error in _pickle module
index f824bb3b5abf8457dd7e3ea60bdbf52d16b78764..d0f318d3fd28e032d4cd2bf68b337fda48a07246 100644 (file)
@@ -415,7 +415,7 @@ SHA1_get_block_size(PyObject *self, void *closure)
 static PyObject *
 SHA1_get_name(PyObject *self, void *closure)
 {
-    return PyUnicode_FromStringAndSize("SHA1", 3);
+    return PyUnicode_FromStringAndSize("SHA1", 4);
 }
 
 static PyObject *