Cast argument to the expected type.
PyErr_SetString(state->PyCursesError, "replace_panel() returned ERR");
return NULL;
}
- Py_SETREF(po->wo, Py_NewRef(win));
+ Py_SETREF(po->wo, (PyCursesWindowObject*)Py_NewRef(win));
Py_RETURN_NONE;
}
* because we're primarily trying to cut overhead for small powers.
*/
assert(bi); /* else there is no significant bit */
- Py_SETREF(z, Py_NewRef(a));
+ Py_SETREF(z, (PyLongObject*)Py_NewRef(a));
for (bit = 2; ; bit <<= 1) {
if (bit > bi) { /* found the first bit */
assert((bi & bit) == 0);
return -1;
Py_INCREF(obj);
}
- Py_XSETREF(su->type, Py_NewRef(type));
+ Py_XSETREF(su->type, (PyTypeObject*)Py_NewRef(type));
Py_XSETREF(su->obj, obj);
Py_XSETREF(su->obj_type, obj_type);
return 0;