summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-05-02 07:47:45 (GMT)
committerGitHub <noreply@github.com>2021-05-02 07:47:45 (GMT)
commit91554e4c5ca3c762998296522f854a7166ba84f0 (patch)
treeaa6e08eedef59c4a4d5c750ed60e5d463f05a4ad /Modules/_ssl.c
parentfd0bc7e7f4f2c7de98a1ebc7ad1ef65b8f8f7ad6 (diff)
downloadcpython-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/_ssl.c')
-rw-r--r--Modules/_ssl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 9163927..5f03214 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -437,7 +437,7 @@ static PyType_Spec sslerror_type_spec = {
"ssl.SSLError",
sizeof(PyOSErrorObject),
0,
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_IMMUTABLETYPE,
sslerror_type_slots
};
@@ -2906,7 +2906,7 @@ static PyType_Spec PySSLSocket_spec = {
"_ssl._SSLSocket",
sizeof(PySSLSocket),
0,
- Py_TPFLAGS_DEFAULT,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE,
PySSLSocket_slots,
};
@@ -4644,7 +4644,7 @@ static PyType_Spec PySSLContext_spec = {
"_ssl._SSLContext",
sizeof(PySSLContext),
0,
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_IMMUTABLETYPE,
PySSLContext_slots,
};
@@ -4850,7 +4850,7 @@ static PyType_Spec PySSLMemoryBIO_spec = {
"_ssl.MemoryBIO",
sizeof(PySSLMemoryBIO),
0,
- Py_TPFLAGS_DEFAULT,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE,
PySSLMemoryBIO_slots,
};
@@ -5025,7 +5025,7 @@ static PyType_Spec PySSLSession_spec = {
"_ssl.SSLSession",
sizeof(PySSLSession),
0,
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_IMMUTABLETYPE,
PySSLSession_slots,
};