Fix FTBFS described in issue #19

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/24/head
Michele Calgaro 7 months ago
parent a0a0ac290e
commit 431aa14fbe
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -7488,7 +7488,7 @@ static int compareTypeDef(const void *key, const void *el)
/* Find which external type it is. */ /* Find which external type it is. */
while (etd->et_nr >= 0) 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) if (tdp == (const sipTypeDef **)el)
{ {
@ -8485,9 +8485,9 @@ static void sipSimpleWrapper_releasebuffer(sipSimpleWrapper *self,
const sipClassTypeDef *ctd; const sipClassTypeDef *ctd;
if ((ptr = getPtrTypeDef(self, &ctd)) == NULL) 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) if ((wc = sip_api_malloc(ulen * sizeof (wchar_t))) == NULL)
return -1; return -1;
ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen); ulen = PyUnicode_AsWideChar(obj, wc, ulen);
if (ulen < 0) if (ulen < 0)
{ {
@ -9797,7 +9797,7 @@ static int convertToWChar(PyObject *obj, wchar_t *ap)
if (PyUnicode_GET_LENGTH(obj) != 1) if (PyUnicode_GET_LENGTH(obj) != 1)
return -1; return -1;
if (PyUnicode_AsWideChar((PyUnicodeObject *)obj, ap, 1) != 1) if (PyUnicode_AsWideChar(obj, ap, 1) != 1)
return -1; return -1;
return 0; 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) if ((wc = sip_api_malloc((ulen + 1) * sizeof (wchar_t))) == NULL)
return -1; return -1;
ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen); ulen = PyUnicode_AsWideChar(obj, wc, ulen);
if (ulen < 0) if (ulen < 0)
{ {

@ -143,7 +143,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
* longer exists. * longer exists.
*/ */
if (PyObject_TypeCheck(self, (PyTypeObject *)&sipSimpleWrapper_Type) && if (PyObject_TypeCheck(self, (PyTypeObject *)&sipSimpleWrapper_Type) &&
sip_api_get_address(self) == NULL) sip_api_get_address((sipSimpleWrapper *)self) == NULL)
{ {
Py_XDECREF(sref); Py_XDECREF(sref);

Loading…
Cancel
Save