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:
parent
58f2c7f424
commit
bbad695e78
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue