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
This commit is contained in:
Victor Stinner 2019-07-09 13:30:52 +02:00 committed by Miss Islington (bot)
parent 91b4f7ab7f
commit 76611c7c0a
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