diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-07-09 12:42:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 12:42:49 (GMT) |
commit | bbad695e7890513be7a9bc662e2d8ae13bfcd313 (patch) | |
tree | 164a22ac51baf3d3b2db264263678363f22e91a2 /Modules/_ssl.c | |
parent | 58f2c7f424fe91ba035918f0f66306af73a37543 (diff) | |
download | cpython-bbad695e7890513be7a9bc662e2d8ae13bfcd313.zip cpython-bbad695e7890513be7a9bc662e2d8ae13bfcd313.tar.gz cpython-bbad695e7890513be7a9bc662e2d8ae13bfcd313.tar.bz2 |
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
(cherry picked from commit 76611c7c0af6b2f4d0d98a5db827d34cff54ce25)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 3351af6..da30cbb 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 |