From 971826e1189df203f8145415d7f9e17c6b07e55d Mon Sep 17 00:00:00 2001 From: Amy Bowersox Date: Wed, 11 Dec 2019 10:59:14 -0700 Subject: [PATCH] more pushing of errors --- src/ep_bitmap.c | 2 +- src/ep_devctxt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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;