X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk_c%2Fscreeninfo.c;h=2f11cfd9661e0f5f2114ad8868bd7ab1b3983b9b;hb=b683a4e0efe470ab38b75a767b4ea2abf004626a;hp=9b0c49ae5b81aeae1d81029df478361f0c97c9c1;hpb=0820c5100d7ea8daed00e7b1bf183edc9414728f;p=chaz%2Fopenbox diff --git a/otk_c/screeninfo.c b/otk_c/screeninfo.c index 9b0c49ae..2f11cfd9 100644 --- a/otk_c/screeninfo.c +++ b/otk_c/screeninfo.c @@ -1,4 +1,4 @@ -// -*- mode: C; indent-tabs-mode: nil; -*- +// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*- #include "../config.h" #include "screeninfo.h" @@ -160,14 +160,14 @@ static PyMethodDef get_methods[] = { -static void otkscreeninfo_dealloc(PyObject* self) +static void otkscreeninfo_dealloc(OtkScreenInfo* self) { - Py_DECREF(((OtkScreenInfo*) self)->display_string); - Py_DECREF(((OtkScreenInfo*) self)->rect); + Py_DECREF(self->display_string); + Py_DECREF(self->rect); #ifdef XINERAMA - Py_DECREF(((OtkScreenInfo*) self)->xinerama_areas); + Py_DECREF(self->xinerama_areas); #endif - PyObject_Del(self); + PyObject_Del((PyObject*)self); } static PyObject *otkscreeninfo_getattr(PyObject *obj, char *name) @@ -182,7 +182,7 @@ PyTypeObject OtkScreenInfo_Type = { "OtkScreenInfo", sizeof(OtkScreenInfo), 0, - otkscreeninfo_dealloc, /*tp_dealloc*/ + (destructor)otkscreeninfo_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ otkscreeninfo_getattr, /*tp_getattr*/ 0, /*tp_setattr*/