Blob Blame History Raw
From c5bb116f359ad91e39642b9e0b56c60bfa19387d Mon Sep 17 00:00:00 2001
From: Chris Burr <christopher.burr@cern.ch>
Date: Wed, 13 Apr 2022 18:00:45 +0200
Subject: [PATCH] Use Py_ssize_t when getting a buffer length from
 PyArg_ParseTuple

---
 bindings/python/src/PyXRootDFile.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bindings/python/src/PyXRootDFile.cc b/bindings/python/src/PyXRootDFile.cc
index 039a77153..619100990 100644
--- a/bindings/python/src/PyXRootDFile.cc
+++ b/bindings/python/src/PyXRootDFile.cc
@@ -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;
@@ -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;
-- 
2.35.1