From cd9bc47c1371da645ec709107cb612a8e8bf7040 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 16 Apr 2019 15:26:58 +0200 Subject: Make the PepType_AS_BUFFER definition complete PepType_AS_BUFFER should also be defined for the non-Limited API version to avoid ugly #ifdef constructs. This patch augments the definition and simplifies qtcore.cpp . Change-Id: Iddfb39e8afaf992f4edf72d871eec1eaf85d5963 Reviewed-by: Friedemann Kleint --- sources/shiboken2/libshiboken/pep384impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sources/shiboken2/libshiboken') diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h index d883677ce..ffbc570a8 100644 --- a/sources/shiboken2/libshiboken/pep384impl.h +++ b/sources/shiboken2/libshiboken/pep384impl.h @@ -316,6 +316,7 @@ LIBSHIBOKEN_API void PyBuffer_Release(Pep_buffer *view); #else #define Pep_buffer Py_buffer +#define PepType_AS_BUFFER(type) ((type)->tp_as_buffer) #endif /* Py_LIMITED_API */ -- cgit v1.2.3