summaryrefslogtreecommitdiff
path: root/src/SWIG/_util.i
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2021-06-13 14:33:05 +0200
committerMatěj Cepl <mcepl@cepl.eu>2021-06-13 14:37:43 +0200
commit565d63117339baf3d0d296fc2d5f9038218a9d79 (patch)
tree7fa8cd46626d183869199967dea9d0e137d2e1a4 /src/SWIG/_util.i
parent89f44ca13ffd4b9e8f9b0e12779582c44c622c41 (diff)
downloadm2crypto-565d63117339baf3d0d296fc2d5f9038218a9d79.tar.gz
Use m2_PyObject_AsReadBuffer instead of PyObject_AsReadBuffer.
PyObject_AsReadBuffer has been removed from Python 3.10 Fixes #297.
Diffstat (limited to 'src/SWIG/_util.i')
-rw-r--r--src/SWIG/_util.i4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SWIG/_util.i b/src/SWIG/_util.i
index bc2ee61..18e446a 100644
--- a/src/SWIG/_util.i
+++ b/src/SWIG/_util.i
@@ -22,7 +22,7 @@ PyObject *util_hex_to_string(PyObject *blob) {
char *ret;
Py_ssize_t len;
- if (PyObject_AsReadBuffer(blob, &buf, &len) == -1)
+ if (m2_PyObject_AsReadBuffer(blob, &buf, &len) == -1)
return NULL;
ret = hex_to_string((unsigned char *)buf, len);
@@ -44,7 +44,7 @@ PyObject *util_string_to_hex(PyObject *blob) {
Py_ssize_t len0;
long len;
- if (PyObject_AsReadBuffer(blob, &buf, &len0) == -1)
+ if (m2_PyObject_AsReadBuffer(blob, &buf, &len0) == -1)
return NULL;
len = len0;