summaryrefslogtreecommitdiff
path: root/otk_c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-21 12:41:32 +0000
committerDana Jansens <danakj@orodu.net>2002-12-21 12:41:32 +0000
commit16e1192e4d18cd0d32b1ab8bf38ac8d69347229d (patch)
tree9282a250671656d3f04d9ce99e4474d8589f1e64 /otk_c
parent0820c5100d7ea8daed00e7b1bf183edc9414728f (diff)
more typesafety
Diffstat (limited to 'otk_c')
-rw-r--r--otk_c/screeninfo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/otk_c/screeninfo.c b/otk_c/screeninfo.c
index 9b0c49ae..62d65eb5 100644
--- a/otk_c/screeninfo.c
+++ b/otk_c/screeninfo.c
@@ -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*/