From 2efea6f21cf1bdd69e339f2285b45a31dd68304a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 21 Dec 2002 12:07:53 +0000 Subject: [PATCH] remove the debug shit --- otk_c/color.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/otk_c/color.c b/otk_c/color.c index 593687d2..d4dad53d 100644 --- a/otk_c/color.c +++ b/otk_c/color.c @@ -86,7 +86,6 @@ static void parseColorName(OtkColor *self, const char *name) { } } -#include static void doCacheCleanup() { unsigned long *pixels; int i, ppos; @@ -97,12 +96,9 @@ static void doCacheCleanup() { // ### TODO - support multiple displays! if (!PyDict_Size(colorcache)) return; // nothing to do - printf("Cleaning Cache...\n"); - pixels = malloc(sizeof(unsigned long) * PyDict_Size(colorcache)); for (i = 0; i < ScreenCount(OBDisplay->display); i++) { - printf("Screen %d\n", i); count = 0; ppos = 0; @@ -110,19 +106,12 @@ static void doCacheCleanup() { // get the screen from the hash if (color->screen != i) continue; // wrong screen - printf("has %d refs\n", color->ob_refcnt); - // does someone other than the cache have a reference? (the cache gets 2) if (color->ob_refcnt > 2) continue; - printf("ppos: %d\n", ppos); - printf("Cleaning pixel: %lx Count: %d\n", color->pixel, count+1); - pixels[count++] = color->pixel; - printf("pixref references before: %d\n", color->ob_refcnt); PyDict_DelItem(colorcache, key); - printf("pixref references after: %d\n", color->ob_refcnt); --ppos; // back up one in the iteration } @@ -130,7 +119,6 @@ static void doCacheCleanup() { XFreeColors(OBDisplay->display, OtkDisplay_ScreenInfo(OBDisplay, i)->colormap, pixels, count, 0); - printf("Done Cleaning Cache. Cleaned %d pixels\n", count); } free(pixels); @@ -142,8 +130,6 @@ static void allocate(OtkColor *self) { assert(!self->allocated); - printf("allocating! %d\n", cleancache); - // allocate color from rgb values xcol.red = self->red | self->red << 8; xcol.green = self->green | self->green << 8; -- 2.45.2