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 76611c7c0a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
Miss Islington (bot) 2019-07-09 05:42:49 -07:00 committed by GitHub
parent 58f2c7f424
commit bbad695e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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