diff --git a/siplib/siplib.c b/siplib/siplib.c index b891f79..f2ac7be 100644 --- a/siplib/siplib.c +++ b/siplib/siplib.c @@ -7488,7 +7488,7 @@ static int compareTypeDef(const void *key, const void *el) /* Find which external type it is. */ while (etd->et_nr >= 0) { - const sipTypeDef **tdp = &module_searched->em_types[etd->et_nr]; + const sipTypeDef **tdp = (const sipTypeDef**)&module_searched->em_types[etd->et_nr]; if (tdp == (const sipTypeDef **)el) { @@ -8485,9 +8485,9 @@ static void sipSimpleWrapper_releasebuffer(sipSimpleWrapper *self, const sipClassTypeDef *ctd; if ((ptr = getPtrTypeDef(self, &ctd)) == NULL) - return -1; + return; - return ctd->ctd_releasebuffer((PyObject *)self, ptr, buf); + ctd->ctd_releasebuffer((PyObject *)self, ptr, buf); } @@ -9762,7 +9762,7 @@ static int convertToWCharArray(PyObject *obj, wchar_t **ap, SIP_SSIZE_T *aszp) if ((wc = sip_api_malloc(ulen * sizeof (wchar_t))) == NULL) return -1; - ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen); + ulen = PyUnicode_AsWideChar(obj, wc, ulen); if (ulen < 0) { @@ -9797,7 +9797,7 @@ static int convertToWChar(PyObject *obj, wchar_t *ap) if (PyUnicode_GET_LENGTH(obj) != 1) return -1; - if (PyUnicode_AsWideChar((PyUnicodeObject *)obj, ap, 1) != 1) + if (PyUnicode_AsWideChar(obj, ap, 1) != 1) return -1; return 0; @@ -9837,7 +9837,7 @@ static int convertToWCharString(PyObject *obj, wchar_t **ap) if ((wc = sip_api_malloc((ulen + 1) * sizeof (wchar_t))) == NULL) return -1; - ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen); + ulen = PyUnicode_AsWideChar(obj, wc, ulen); if (ulen < 0) { diff --git a/siplib/tqtlib.c b/siplib/tqtlib.c index df35d6c..d59c138 100644 --- a/siplib/tqtlib.c +++ b/siplib/tqtlib.c @@ -143,7 +143,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs) * longer exists. */ if (PyObject_TypeCheck(self, (PyTypeObject *)&sipSimpleWrapper_Type) && - sip_api_get_address(self) == NULL) + sip_api_get_address((sipSimpleWrapper *)self) == NULL) { Py_XDECREF(sref);