Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python 3.10+ issues from PY_SSIZE_T_CLEAN not being set #1671

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/python/src/PyXRootD.hh
Expand Up @@ -25,6 +25,7 @@
#ifndef PYXROOTD_HH_
#define PYXROOTD_HH_

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <string>
#include "structmember.h"
Expand Down
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