summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-07-09 13:30:52 +0200
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-07-09 04:30:52 -0700
commit76611c7c0af6b2f4d0d98a5db827d34cff54ce25 (patch)
treec22a061c9ea72813f40d3cd0c85d7ceaedc9df32
parent91b4f7ab7f9a5e0908b91379ee085ae087a76483 (diff)
downloadcpython-git-76611c7c0af6b2f4d0d98a5db827d34cff54ce25.tar.gz
bpo-37120: Fix _ssl get_num_tickets() (GH-14668)
Replace PyLong_FromLong() with PyLong_FromSize_t(): SSL_CTX_get_num_tickets() return type is size_t. https://bugs.python.org/issue37120
-rw-r--r--Modules/_ssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 3351af6cde..da30cbb758 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -3641,7 +3641,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