]> Dogcows Code - chaz/openbox/blobdiff - otk_c/rect.c
no long used with our Timer-ng!
[chaz/openbox] / otk_c / rect.c
index 14b5fc56835beab79577ddf8684f11e6b7a842d1..086e46a7eb897f47beeee495c0367045f33b1257 100644 (file)
@@ -1,15 +1,11 @@
-// -*- mode: C; indent-tabs-mode: nil; -*-
+// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 
 #include "../config.h"
 #include "rect.h"
 
-extern PyTypeObject OtkRect_Type;
-
 PyObject *OtkRect_New(int x, int y, int width, int height)
 {
-  OtkRect* self;
-
-  self = PyObject_New(OtkRect, &OtkRect_Type);
+  OtkRect* self = PyObject_New(OtkRect, &OtkRect_Type);
 
   self->x = x;
   self->y = y;
@@ -21,28 +17,28 @@ PyObject *OtkRect_New(int x, int y, int width, int height)
 
 
 
-static PyObject *otkrect_getx(OtkRect* self, PyObject* args)
+static PyObject *otkrect_getx(OtkRect *self, PyObject *args)
 {
   if (!PyArg_ParseTuple(args, ":getX"))
     return NULL;
   return PyInt_FromLong(self->x);
 }
 
-static PyObject *otkrect_gety(OtkRect* self, PyObject* args)
+static PyObject *otkrect_gety(OtkRect *self, PyObject *args)
 {
   if (!PyArg_ParseTuple(args, ":getY"))
     return NULL;
   return PyInt_FromLong(self->y);
 }
 
-static PyObject *otkrect_getwidth(OtkRect* self, PyObject* args)
+static PyObject *otkrect_getwidth(OtkRect *self, PyObject *args)
 {
   if (!PyArg_ParseTuple(args, ":getWidth"))
     return NULL;
   return PyInt_FromLong(self->width);
 }
 
-static PyObject *otkrect_getheight(OtkRect* self, PyObject* args)
+static PyObject *otkrect_getheight(OtkRect *self, PyObject *args)
 {
   if (!PyArg_ParseTuple(args, ":getHeight"))
     return NULL;
@@ -64,7 +60,7 @@ static PyMethodDef get_methods[] = {
 
 
 
-static void otkrect_dealloc(PyObjectself)
+static void otkrect_dealloc(PyObject *self)
 {
   PyObject_Del(self);
 }
@@ -81,14 +77,14 @@ PyTypeObject OtkRect_Type = {
   "OtkRect",
   sizeof(OtkRect),
   0,
-  otkrect_dealloc, /*tp_dealloc*/
-  0,          /*tp_print*/
-  otkrect_getattr, /*tp_getattr*/
-  0,          /*tp_setattr*/
-  0,          /*tp_compare*/
-  0,          /*tp_repr*/
-  0,          /*tp_as_number*/
-  0,          /*tp_as_sequence*/
-  0,          /*tp_as_mapping*/
-  0,          /*tp_hash */
+  otkrect_dealloc,     /*tp_dealloc*/
+  0,                   /*tp_print*/
+  otkrect_getattr,     /*tp_getattr*/
+  0,                   /*tp_setattr*/
+  0,                   /*tp_compare*/
+  0,                   /*tp_repr*/
+  0,                   /*tp_as_number*/
+  0,                   /*tp_as_sequence*/
+  0,                   /*tp_as_mapping*/
+  0,                   /*tp_hash */
 };
This page took 0.022449 seconds and 4 git commands to generate.