Skip to content

Commit bbad695

Browse files
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 76611c7) Co-authored-by: Victor Stinner <[email protected]>
1 parent 58f2c7f commit bbad695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3641,7 +3641,7 @@ set_maximum_version(PySSLContext *self, PyObject *arg, void *c)
36413641
static PyObject *
36423642
get_num_tickets(PySSLContext *self, void *c)
36433643
{
3644-
return PyLong_FromLong(SSL_CTX_get_num_tickets(self->ctx));
3644+
return PyLong_FromSize_t(SSL_CTX_get_num_tickets(self->ctx));
36453645
}
36463646

36473647
static int

0 commit comments

Comments
 (0)