diff --git a/src/ep_bitmap.c b/src/ep_bitmap.c index 4f4f3a6..abb2406 100755 --- a/src/ep_bitmap.c +++ b/src/ep_bitmap.c @@ -105,7 +105,7 @@ PyObject *Epython_wrap_bitmap(PBITMAP pbmp) rc = PyType_GenericNew(&BitmapType, args, kwargs); if (rc) { - pbitmapobj = (BitmapObject)rc; + pbitmapobj = (BitmapObject *)rc; BMP_Delete(pbitmapobj->pbmp); pbitmapobj->pbmp = pbmp; } diff --git a/src/ep_devctxt.c b/src/ep_devctxt.c index 1300692..4e77134 100755 --- a/src/ep_devctxt.c +++ b/src/ep_devctxt.c @@ -156,11 +156,11 @@ static PyObject *devctxt_select_bitmap(DevCtxtObject *self, BitmapObject *newbmp old_bitmap = Epython_wrap_bitmap(old_pbmp); if (!old_bitmap) { - DC_SelectObject(self->pdctxt, old_pbmp); + DC_SelectObject(self->pdctxt, (PGFXOBJECT)old_pbmp); return NULL; } else - PY_INCREF(old_bitmap); + Py_INCREF(old_bitmap); } Py_DECREF(self->selected_bitmap); self->selected_bitmap = newbmp;