compile errors in new stuff

This commit is contained in:
Amy Bowersox 2019-12-11 10:57:07 -07:00
parent 4745d51361
commit 864360f9fa
2 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#include <string.h>
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "scode.h"
#include "gfxobj.h"
#include "bitmap.h"
#include "ep_types.h"
@ -48,7 +49,7 @@ static int bitmap_init(BitmapObject *self, PyObject *args, PyObject *kwds)
width = MAX(1, width);
height = MAX(1, height);
self->pbmp = BMP_Create(width, height, NULL);
if (!(self->bmp))
if (!(self->pbmp))
{
PyErr_SetString(PyExc_RuntimeError, "unable to create bitmap");
return -1;

View File

@ -165,14 +165,12 @@ static PyObject *devctxt_select_bitmap(DevCtxtObject *self, BitmapObject *newbmp
Py_DECREF(self->selected_bitmap);
self->selected_bitmap = newbmp;
Py_INCREF(self->selected_bitmap);
return old_bitmap;
return (PyObject *)old_bitmap;
}
static PyObject *devctxt_select_object(DevCtxtObject *self, PyObject *args)
{
PyObject *obj;
PBITMAP old_bitmap;
BitmapObject *old_bmp_object, *new_bmp_object;
if (!PyArg_ParseTuple(args, "O", &obj))
return NULL;