aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp')
-rw-r--r--sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp b/sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp
index 8f01b4a0..32238708 100644
--- a/sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp
+++ b/sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp
@@ -33,7 +33,7 @@ extern "C" {
static Py_ssize_t SbkByteArray_segcountproc(PyObject* self, Py_ssize_t* lenp)
{
if (lenp)
- *lenp = self->ob_type->tp_as_sequence->sq_length(self);
+ *lenp = Py_TYPE(self)->tp_as_sequence->sq_length(self);
return 1;
}
static Py_ssize_t SbkByteArray_readbufferproc(PyObject* self, Py_ssize_t segment, void** ptrptr)