diff options
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp')
-rw-r--r-- | sources/shiboken2/tests/samplebinding/bytearray_bufferprotocol.cpp | 2 |
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 8f01b4a0a..322387088 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) |