Skip to content

Commit

Permalink
Use Py_ssize_t when getting a buffer length from PyArg_ParseTuple
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Apr 13, 2022
1 parent 22ea5dc commit c5bb116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/python/src/PyXRootDFile.cc
Expand Up @@ -424,7 +424,7 @@ namespace PyXRootD
static const char *kwlist[] = { "buffer", "offset", "size", "timeout",
"callback", NULL };
const char *buffer;
int buffsize;
Py_ssize_t buffsize;
uint64_t offset = 0;
uint32_t size = 0;
uint16_t timeout = 0;
Expand Down Expand Up @@ -641,7 +641,7 @@ namespace PyXRootD
{
static const char *kwlist[] = { "arg", "timeout", "callback", NULL };
const char *buffer = 0;
int buffSize = 0;
Py_ssize_t buffSize = 0;
uint16_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL, *pyresponse = NULL;
XrdCl::XRootDStatus status;
Expand Down

0 comments on commit c5bb116

Please sign in to comment.