Message345914
New changeset 78c7d527799dacca91b9ed67057cb996efe526b0 by Christian Heimes in branch 'master':
bpo-37120: Add SSLContext.num_tickets (GH-13719)
https://github.com/python/cpython/commit/78c7d527799dacca91b9ed67057cb996efe526b0
This change introduced this warning on Windows:
c:\vstinner\python\master\modules\_ssl.c(3624): warning C4267: 'function': conv
ersion from 'size_t' to 'long', possible loss of data [C:\vstinner\python\maste
r\PCbuild\_ssl.vcxproj]
SSL_CTX_get_num_tickets() return type is size_t. I suggest this change:
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 2331c58ad7..3ffb6380d3 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -3621,7 +3621,7 @@ set_maximum_version(PySSLContext *self, PyObject *arg, void *c)
static PyObject *
get_num_tickets(PySSLContext *self, void *c)
{
- return PyLong_FromLong(SSL_CTX_get_num_tickets(self->ctx));
+ return PyLong_FromSize_t(SSL_CTX_get_num_tickets(self->ctx));
}
static int |
|
Date |
User |
Action |
Args |
2019-06-17 21:29:28 | vstinner | set | recipients:
+ vstinner, janssen, christian.heimes, alex, njs, dstufft |
2019-06-17 21:29:28 | vstinner | set | messageid: <1560806968.91.0.381503682557.issue37120@roundup.psfhosted.org> |
2019-06-17 21:29:28 | vstinner | link | issue37120 messages |
2019-06-17 21:29:28 | vstinner | create | |
|