diff options
author | Christian Heimes <christian@python.org> | 2021-05-02 07:47:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 07:47:45 (GMT) |
commit | 91554e4c5ca3c762998296522f854a7166ba84f0 (patch) | |
tree | aa6e08eedef59c4a4d5c750ed60e5d463f05a4ad /Modules/_hashopenssl.c | |
parent | fd0bc7e7f4f2c7de98a1ebc7ad1ef65b8f8f7ad6 (diff) | |
download | cpython-91554e4c5ca3c762998296522f854a7166ba84f0.zip cpython-91554e4c5ca3c762998296522f854a7166ba84f0.tar.gz cpython-91554e4c5ca3c762998296522f854a7166ba84f0.tar.bz2 |
bpo-43908: Mark ssl, hash, and hmac types as immutable (GH-25792)
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index de9bdd4..b2c6775 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -588,7 +588,7 @@ static PyType_Spec EVPtype_spec = { "_hashlib.HASH", /*tp_name*/ sizeof(EVPobject), /*tp_basicsize*/ 0, /*tp_itemsize*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_IMMUTABLETYPE, EVPtype_slots }; @@ -737,7 +737,7 @@ static PyType_Spec EVPXOFtype_spec = { "_hashlib.HASHXOF", /*tp_name*/ sizeof(EVPobject), /*tp_basicsize*/ 0, /*tp_itemsize*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_IMMUTABLETYPE, EVPXOFtype_slots }; @@ -1729,7 +1729,7 @@ static PyType_Slot HMACtype_slots[] = { PyType_Spec HMACtype_spec = { "_hashlib.HMAC", /* name */ sizeof(HMACobject), /* basicsize */ - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION, + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_IMMUTABLETYPE, .slots = HMACtype_slots, }; |