]> Dogcows Code - chaz/openbox/blobdiff - otk_c/display.c
rm consts that wont compile on some libfreetype's
[chaz/openbox] / otk_c / display.c
index 016aa9487fcd257dad2656a74908ea8583884cb5..c0cae13cb07f5c37cbdd9bc5db25c7ad170aee11 100644 (file)
@@ -1,4 +1,4 @@
-// -*- mode: C; indent-tabs-mode: nil; -*-
+// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 
 #include "../config.h"
 #include "display.h"
@@ -123,9 +123,9 @@ line argument.\n\n"));
   OBDisplay = self;
   
   // Get information on all the screens which are available.
-  self->screenInfoList = PyList_New(ScreenCount(self->display));
+  self->screenInfoList = (PyListObject*)PyList_New(ScreenCount(self->display));
   for (i = 0; i < ScreenCount(self->display); ++i)
-    PyList_SetItem(self->screenInfoList, i, OtkScreenInfo_New(i));
+    PyList_SetItem((PyObject*)self->screenInfoList, i, OtkScreenInfo_New(i));
 
   Py_INCREF(OBDisplay); // make sure it stays around!!
 }
@@ -148,8 +148,8 @@ void OtkDisplay_Ungrab(OtkDisplay *self)
 
 OtkScreenInfo *OtkDisplay_ScreenInfo(OtkDisplay *self, int num)
 {
-  PyObject *py = PyList_GetItem(self->screenInfoList, num);
-  return (OtkScreenInfo*) py;
+  assert(num >= 0);
+  return (OtkScreenInfo*)PyList_GetItem((PyObject*)self->screenInfoList, num);
 }
 
 
This page took 0.021087 seconds and 4 git commands to generate.