Commits

illume committed 612f754

From Marcus: Fixes lots of warnings... mostly redeclarations.

Comments (0)

Files changed (11)

examples/scrap_clipboard.py

             fp = open ("data/liquid.bmp", "rb")
             buf = fp.read ()
             scrap.put ("image/bmp", buf)
-            print len (buf)
             fp.close ()
 
     pygame.display.flip()
  */
 
 
-#define GET_PIXEL(buf, bpp, fmt, pixel)                    \
-do {                                                                       \
-        switch (bpp) {                                                           \
-                case 1:                                                           \
-                        pixel = *((Uint8 *)(buf));                           \
-                break;                                                       \
-                case 2:                                                           \
-                        pixel = *((Uint16 *)(buf));                           \
-                break;                                                           \
-                case 4:                                                           \
-                        pixel = *((Uint32 *)(buf));                           \
-                break;                                                           \
-                default:        {/* case 3: FIXME: broken code (no alpha) */                   \
-                        Uint8 *b = (Uint8 *)buf;                           \
-                        if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {                   \
-                                pixel = b[0] + (b[1] << 8) + (b[2] << 16); \
-                        } else {                                           \
-                                pixel = (b[0] << 16) + (b[1] << 8) + b[2]; \
-                        }                                                   \
-                }                                                           \
-                break;                                                           \
-        }                                                                   \
-} while(0)
+#define GET_PIXEL(buf, bpp, fmt, pixel)                                 \
+    do {                                                                \
+        switch (bpp) {                                                  \
+        case 1:                                                         \
+            pixel = *((Uint8 *)(buf));                                  \
+            break;                                                      \
+        case 2:                                                         \
+            pixel = *((Uint16 *)(buf));                                 \
+            break;                                                      \
+        case 4:                                                         \
+            pixel = *((Uint32 *)(buf));                                 \
+            break;                                                      \
+        default:        {/* case 3: FIXME: broken code (no alpha) */    \
+            Uint8 *b = (Uint8 *)buf;                                    \
+            if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {                       \
+                pixel = b[0] + (b[1] << 8) + (b[2] << 16);              \
+            } else {                                                    \
+                pixel = (b[0] << 16) + (b[1] << 8) + b[2];              \
+            }                                                           \
+        }                                                               \
+            break;                                                      \
+        }                                                               \
+    } while(0)
 
 
-#define DISEMBLE_RGBA(buf, bpp, fmt, pixel, R, G, B, A)                    \
-do {                                                                       \
-        if(bpp==1){\
-            pixel = *((Uint8 *)(buf));                           \
-            R = fmt->palette->colors[pixel].r; \
-            G = fmt->palette->colors[pixel].g; \
-            B = fmt->palette->colors[pixel].b; \
-            A = 255; \
-        } else { \
-        switch (bpp) {                                                           \
-                case 2:                                                           \
-                        pixel = *((Uint16 *)(buf));                           \
-                break;                                                           \
-                case 4:                                                           \
-                        pixel = *((Uint32 *)(buf));                           \
-                break;                                                           \
-                default:        {/* case 3: FIXME: broken code (no alpha) */                   \
-                        Uint8 *b = (Uint8 *)buf;                           \
-                        if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {                   \
-                                pixel = b[0] + (b[1] << 8) + (b[2] << 16); \
-                        } else {                                           \
-                                pixel = (b[0] << 16) + (b[1] << 8) + b[2]; \
-                        }                                                   \
-                }                                                           \
-                break;                                                           \
-            }                                                                   \
-            R = ((pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss;                 \
-            G = ((pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss;                 \
-            B = ((pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss;                 \
-            A = ((pixel&fmt->Amask)>>fmt->Ashift)<<fmt->Aloss;                 \
-        }\
-} while(0)
+#define DISEMBLE_RGBA(buf, bpp, fmt, _pixel, R, G, B, A)                \
+    do {                                                                \
+        if(bpp==1){                                                     \
+            _pixel = *((Uint8 *)(buf));                                 \
+            R = fmt->palette->colors[_pixel].r;                         \
+            G = fmt->palette->colors[_pixel].g;                         \
+            B = fmt->palette->colors[_pixel].b;                         \
+            A = 255;                                                    \
+        } else {                                                        \
+            switch (bpp) {                                              \
+            case 2:                                                     \
+                _pixel = *((Uint16 *)(buf));                            \
+                break;                                                  \
+            case 4:                                                     \
+                _pixel = *((Uint32 *)(buf));                            \
+                break;                                                  \
+            default:        {/* case 3: FIXME: broken code (no alpha) */ \
+                Uint8 *b = (Uint8 *)buf;                                \
+                if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {                   \
+                    _pixel = b[0] + (b[1] << 8) + (b[2] << 16);         \
+                } else {                                                \
+                    _pixel = (b[0] << 16) + (b[1] << 8) + b[2];         \
+                }                                                       \
+            }                                                           \
+                break;                                                  \
+            }                                                           \
+            R = ((_pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss;         \
+            G = ((_pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss;         \
+            B = ((_pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss;         \
+            A = ((_pixel&fmt->Amask)>>fmt->Ashift)<<fmt->Aloss;         \
+        }                                                               \
+    } while(0)
 
 
-#define DISEMBLE_RGBA4(buf, bpp, fmt, pixel, R, G, B, A)                    \
-                        pixel = *((Uint32 *)(buf));                           \
-            R = ((pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss;                 \
-            G = ((pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss;                 \
-            B = ((pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss;                 \
-            A = ((pixel&fmt->Amask)>>fmt->Ashift)<<fmt->Aloss;                 \
+#define DISEMBLE_RGBA4(buf, bpp, fmt, pxl, R, G, B, A)                  \
+    pixel = *((Uint32 *)(buf));                                         \
+    R = ((pxl&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss;                    \
+    G = ((pxl&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss;                    \
+    B = ((pxl&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss;                    \
+    A = ((pxl&fmt->Amask)>>fmt->Ashift)<<fmt->Aloss;                    \
+    
 
+#define PIXEL_FROM_RGBA(px, fmt, r, g, b, a)                            \
+    {                                                                   \
+        px = ((r>>fmt->Rloss)<<fmt->Rshift)|                            \
+            ((g>>fmt->Gloss)<<fmt->Gshift)|                             \
+            ((b>>fmt->Bloss)<<fmt->Bshift)|                             \
+            ((a<<fmt->Aloss)<<fmt->Ashift);                             \
+    }
+#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)                        \
+    {                                                                   \
+        switch (bpp) {                                                  \
+        case 2: {                                                       \
+            Uint16 __pixel;                                             \
+            PIXEL_FROM_RGBA(__pixel, fmt, r, g, b, a);                  \
+            *((Uint16 *)(buf)) = __pixel;                               \
+        }                                                               \
+            break;                                                      \
+        case 4: {                                                       \
+            Uint32 __pixel;                                             \
+            PIXEL_FROM_RGBA(__pixel, fmt, r, g, b, a);                  \
+            *((Uint32 *)(buf)) = __pixel;                               \
+        }                                                               \
+            break;                                                      \
+        }                                                               \
+    }
 
-#define PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a)                         \
-{                                                                       \
-        pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|                                \
-                ((g>>fmt->Gloss)<<fmt->Gshift)|                                \
-                ((b>>fmt->Bloss)<<fmt->Bshift)|                                \
-                ((a<<fmt->Aloss)<<fmt->Ashift);                                \
-}
-#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)                        \
-{                                                                       \
-        switch (bpp) {                                                        \
-                case 2: {                                                \
-                        Uint16 pixel;                                        \
-                        PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a);        \
-                        *((Uint16 *)(buf)) = pixel;                        \
-                }                                                        \
-                break;                                                        \
-                case 4: {                                                \
-                        Uint32 pixel;                                        \
-                        PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a);        \
-                        *((Uint32 *)(buf)) = pixel;                        \
-                }                                                        \
-                break;                                                        \
-        }                                                                \
-}
 
-
-#define ASSEMBLE_RGBA4(buf, bpp, fmt, r, g, b, a)                        \
-                        Uint32 pixel;                                        \
-                        PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a);        \
-                        *((Uint32 *)(buf)) = pixel;                        \
-
+#define ASSEMBLE_RGBA4(buf, bpp, fmt, r, g, b, a)                       \
+    Uint32 pixel1;                                                      \
+    PIXEL_FROM_RGBA(pixel1, fmt, r, g, b, a);                           \
+    *((Uint32 *)(buf)) = pixel1;                                        \
+    
 
 
 #if 0
-#define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA)  \
-do {                                            \
-        dR = (((sR-dR)*(sA))>>8)+dR;                \
-        dG = (((sG-dG)*(sA))>>8)+dG;                \
-        dB = (((sB-dB)*(sA))>>8)+dB;                \
-        dA = sA+dA - ((sA*dA)/255);                \
-} while(0)
+#define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA)     \
+    do {                                                \
+        dR = (((sR-dR)*(sA))>>8)+dR;                    \
+        dG = (((sG-dG)*(sA))>>8)+dG;                    \
+        dB = (((sB-dB)*(sA))>>8)+dB;                    \
+        dA = sA+dA - ((sA*dA)/255);                     \
+    } while(0)
 #else
-#define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA)  \
-do {   if(dA){\
-        dR = ((dR<<8) + (sR-dR)*sA + sR) >> 8;	   \
-        dG = ((dG<<8) + (sG-dG)*sA + sG) >> 8;     \
-        dB = ((dB<<8) + (sB-dB)*sA + sB) >> 8;	   \
-        dA = sA+dA - ((sA*dA)/255);                \
-    }else{\
-        dR = sR;                \
-        dG = sG;                \
-        dB = sB;                \
-        dA = sA;               \
-    }\
-} while(0)
+#define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA)     \
+    do {   if(dA){                                      \
+            dR = ((dR<<8) + (sR-dR)*sA + sR) >> 8;      \
+            dG = ((dG<<8) + (sG-dG)*sA + sG) >> 8;      \
+            dB = ((dB<<8) + (sB-dB)*sA + sB) >> 8;      \
+            dA = sA+dA - ((sA*dA)/255);                 \
+        }else{                                          \
+            dR = sR;                                    \
+            dG = sG;                                    \
+            dB = sB;                                    \
+            dA = sA;                                    \
+        }                                               \
+    } while(0)
 #endif
 
 
+#define BLEND_TOP_VARS                        \
+    int n,ii;                                 \
+    int width = info->d_width;                \
+    int height = info->d_height;              \
+    Uint8 *src = info->s_pixels;              \
+    int srcskip = info->s_skip;               \
+    Uint8 *dst = info->d_pixels;              \
+    int dstskip = info->d_skip;               \
+    SDL_PixelFormat *srcfmt = info->src;      \
+    SDL_PixelFormat *dstfmt = info->dst;      \
+    int srcbpp = srcfmt->BytesPerPixel;       \
+    int dstbpp = dstfmt->BytesPerPixel;       \
+    Uint8 dR, dG, dB, dA, sR, sG, sB, sA;     \
+    Uint32 pixel;                             \
+    Uint32 tmp;                               \
+    Sint32 tmp2;                              \
+    ii = tmp = tmp2 = 0 ;                     \
 
 
-#define BLEND_TOP_VARS \
-        int n,ii; \
-        int width = info->d_width; \
-        int height = info->d_height; \
-        Uint8 *src = info->s_pixels; \
-        int srcskip = info->s_skip; \
-        Uint8 *dst = info->d_pixels; \
-        int dstskip = info->d_skip; \
-        SDL_PixelFormat *srcfmt = info->src; \
-        SDL_PixelFormat *dstfmt = info->dst; \
-        int srcbpp = srcfmt->BytesPerPixel; \
-        int dstbpp = dstfmt->BytesPerPixel; \
-        Uint8 dR, dG, dB, dA, sR, sG, sB, sA; \
-        Uint32 pixel; \
-        Uint32 tmp; \
-        Sint32 tmp2; \
-        ii = tmp = tmp2 = 0 ; \
+#define BLEND_TOP                  \
+    while ( height-- )             \
+    {                              \
+        for(n=width; n>0; --n)     \
+        {                          \
+            
 
+#define BLEND_TOP_GENERIC                       \
+    BLEND_TOP;                                                     \
+    DISEMBLE_RGBA(src, srcbpp, srcfmt, pixel, sR, sG, sB, sA);     \
+    DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);     \
+    
 
+#define BLEND_BOTTOM                            \
+    }                                           \
+    src += srcskip;                             \
+    dst += dstskip;                             \
+    }                                           \
+    
+#define BLEND_BOTTOM_GENERIC                                        \
+    ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);             \
+    src += srcbpp;                                                  \
+    dst += dstbpp;                                                  \
+    BLEND_BOTTOM;                                                   \
+    
 
-#define BLEND_TOP \
-        while ( height-- ) \
-        { \
-            for(n=width; n>0; --n) \
-            { \
-
-
-#define BLEND_TOP_GENERIC \
-        BLEND_TOP; \
-        DISEMBLE_RGBA(src, srcbpp, srcfmt, pixel, sR, sG, sB, sA); \
-        DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); \
-
-
-#define BLEND_BOTTOM \
-            } \
-            src += srcskip; \
-            dst += dstskip; \
-        } \
-
-#define BLEND_BOTTOM_GENERIC \
-                ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); \
-                src += srcbpp; \
-                dst += dstbpp; \
-                BLEND_BOTTOM; \
-
-
-#define BLEND_TOP_4 \
+#define BLEND_TOP_4                                                \
     if(srcfmt->BytesPerPixel == 4 && dstfmt->BytesPerPixel == 4) { \
-        BLEND_TOP;  \
-            for(ii=0;ii < 3; ii++){ \
-
-#define BLEND_START_GENERIC \
-                src++;dst++; \
-            } \
-            src++;dst++; \
-        BLEND_BOTTOM;  \
-    } else { \
-        BLEND_TOP_GENERIC;  \
+        BLEND_TOP;                                                 \
+        for(ii=0;ii < 3; ii++){                                    \
+            
+#define BLEND_START_GENERIC                     \
+    src++;dst++;                                \
+    }                                           \
+    src++;dst++;                                \
+    BLEND_BOTTOM;                               \
+    } else {                                    \
+        BLEND_TOP_GENERIC;                      \
 // NOTE: we don't touch alpha.
 
 
-#define BLEND_END_GENERIC \
-        BLEND_BOTTOM_GENERIC; \
-    } \
-
+#define BLEND_END_GENERIC     \
+    BLEND_BOTTOM_GENERIC;     \
+    }                         \
+    
 
 /*
  * Blending functions for the 32bit routines.
  */
 
-#define BLEND_ADD4(S,D)  \
+#define BLEND_ADD4(S,D)                              \
     tmp = (D) + (S);  (D) = (tmp <= 255 ? tmp: 255); \
-
-#define BLEND_SUB4(S,D)  \
-    tmp2 = (D)-(S); (D) = (tmp2 >= 0 ? tmp2 : 0); \
-
-#define BLEND_MULT4(S,D)  \
+    
+#define BLEND_SUB4(S,D)                                 \
+    tmp2 = (D)-(S); (D) = (tmp2 >= 0 ? tmp2 : 0);       \
+    
+#define BLEND_MULT4(S,D)                                    \
     tmp = ((D) * (S)) >> 8;  (D) = (tmp <= 255 ? tmp: 255); \
 
-#define BLEND_MIN4(S,D)  \
+#define BLEND_MIN4(S,D)           \
     if ((S) < (D)) { (D) = (S); } \
 
-#define BLEND_MAX4(S,D)  \
+#define BLEND_MAX4(S,D)           \
     if ((S) > (D)) { (D) = (S); } \
 
 
  */
 
 #define BLEND_ADD(sR, sG, sB, sA, dR, dG, dB, dA)  \
-    dR = (dR+sR <= 255 ? dR+sR: 255); \
-    dG = (dG+sG <= 255 ? dG+sG : 255); \
-    dB = (dB+sB <= 255 ? dB+sB : 255); \
+    dR = (dR+sR <= 255 ? dR+sR: 255);              \
+    dG = (dG+sG <= 255 ? dG+sG : 255);             \
+    dB = (dB+sB <= 255 ? dB+sB : 255);             \
 
 
-#define BLEND_SUB(sR, sG, sB, sA, dR, dG, dB, dA)  \
-    tmp2 = dR - sR; dR = (tmp2 >= 0 ? tmp2 : 0); \
-    tmp2 = dG - sG; dG = (tmp2 >= 0 ? tmp2 : 0); \
-    tmp2 = dB - sB; dB = (tmp2 >= 0 ? tmp2 : 0); \
+#define BLEND_SUB(sR, sG, sB, sA, dR, dG, dB, dA)       \
+    tmp2 = dR - sR; dR = (tmp2 >= 0 ? tmp2 : 0);        \
+    tmp2 = dG - sG; dG = (tmp2 >= 0 ? tmp2 : 0);        \
+    tmp2 = dB - sB; dB = (tmp2 >= 0 ? tmp2 : 0);        \
+    
 
-
-#define BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA)  \
-    dR = (dR * sR) >> 8; \
-    dG = (dG * sG) >> 8; \
-    dB = (dB * sB) >> 8; \
-
-#define BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA)  \
-    if(sR < dR) { dR = sR; } \
-    if(sG < dG) { dG = sG; } \
-    if(sB < dB) { dB = sB; } \
-
-#define BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA)  \
-    if(sR > dR) { dR = sR; } \
-    if(sG > dG) { dG = sG; } \
-    if(sB > dB) { dB = sB; } \
+#define BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA)      \
+    dR = (dR * sR) >> 8;                                \
+    dG = (dG * sG) >> 8;                                \
+    dB = (dB * sB) >> 8;                                \
+    
+#define BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA)       \
+    if(sR < dR) { dR = sR; }                            \
+    if(sG < dG) { dG = sG; }                            \
+    if(sB < dB) { dB = sB; }                            \
+    
+#define BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA)       \
+    if(sR > dR) { dR = sR; }                            \
+    if(sG > dG) { dG = sG; }                            \
+    if(sB > dB) { dB = sB; }                            \
 
 
 /*
         {
             for(n=width; n>0; --n)
             {
-                Uint32 pixel;
-                DISEMBLE_RGBA(src, srcbpp, srcfmt, pixel, sR, sG, sB, sA);
-                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
+                Uint32 apixel;
+                DISEMBLE_RGBA(src, srcbpp, srcfmt, apixel, sR, sG, sB, sA);
+                DISEMBLE_RGBA(dst, dstbpp, dstfmt, apixel, dR, dG, dB, dA);
                 ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA);
                 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
                 src += srcbpp;
         {
             for(n=width; n>0; --n)
             {
-                Uint32 pixel;
-                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
-                DISEMBLE_RGBA(src, srcbpp, srcfmt, pixel, sR, sG, sB, sA);
-                sA = (pixel == colorkey) ? 0 : alpha;
+                Uint32 apixel;
+                DISEMBLE_RGBA(dst, dstbpp, dstfmt, apixel, dR, dG, dB, dA);
+                DISEMBLE_RGBA(src, srcbpp, srcfmt, apixel, sR, sG, sB, sA);
+                sA = (apixel == colorkey) ? 0 : alpha;
                 ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA);
                 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
                 src += srcbpp;
         {
             for(n=width; n>0; --n)
             {
-                int pixel;
-                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
-                DISEMBLE_RGBA(src, srcbpp, srcfmt, pixel, sR, sG, sB, sA);
+                int apixel;
+                DISEMBLE_RGBA(dst, dstbpp, dstfmt, apixel, dR, dG, dB, dA);
+                DISEMBLE_RGBA(src, srcbpp, srcfmt, apixel, sR, sG, sB, sA);
                 ALPHA_BLEND(sR, sG, sB, alpha, dR, dG, dB, dA);
                 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
                 src += srcbpp;
 	return 0;
 }
 
-static int IntFromObjIndex(PyObject* obj, int index, int* val)
+static int IntFromObjIndex(PyObject* obj, int _index, int* val)
 {
 	int result = 0;
 	PyObject* item;
-	item = PySequence_GetItem(obj, index);
+	item = PySequence_GetItem(obj, _index);
 	if(item)
 	{
 		result = IntFromObj(item, val);
 	return 0;
 }
 
-static int FloatFromObjIndex(PyObject* obj, int index, float* val)
+static int FloatFromObjIndex(PyObject* obj, int _index, float* val)
 {
 	int result = 0;
 	PyObject* item;
-	item = PySequence_GetItem(obj, index);
+	item = PySequence_GetItem(obj, _index);
 	if(item)
 	{
 		result = FloatFromObj(item, val);
 	return 0;
 }
 
-static Uint32 UintFromObjIndex(PyObject* obj, int index, Uint32* val)
+static Uint32 UintFromObjIndex(PyObject* obj, int _index, Uint32* val)
 {
 	int result = 0;
 	PyObject* item;
-	item = PySequence_GetItem(obj, index);
+	item = PySequence_GetItem(obj, _index);
 	if(item)
 	{
 		result = UintFromObj(item, val);
 {
 	int joy_id = PyJoystick_AsID(self);
 	SDL_Joystick* joy = joystick_stickdata[joy_id];
-	int index, value;
+	int _index, value;
 	
-	if(!PyArg_ParseTuple(args, "i", &index))
+	if(!PyArg_ParseTuple(args, "i", &_index))
 		return NULL;
 
 	JOYSTICK_INIT_CHECK();
 	if(!joy)
 		return RAISE(PyExc_SDLError, "Joystick not initialized");
-	if(index < 0 || index >= SDL_JoystickNumButtons(joy))
+	if(_index < 0 || _index >= SDL_JoystickNumButtons(joy))
 		return RAISE(PyExc_SDLError, "Invalid joystick button");
 
-	value = SDL_JoystickGetButton(joy, index);
+	value = SDL_JoystickGetButton(joy, _index);
 	return PyInt_FromLong(value);
 }
 
 {
 	int joy_id = PyJoystick_AsID(self);
 	SDL_Joystick* joy = joystick_stickdata[joy_id];
-	int index, dx, dy;
+	int _index, dx, dy;
 	
-	if(!PyArg_ParseTuple(args, "i", &index))
+	if(!PyArg_ParseTuple(args, "i", &_index))
 		return NULL;
 
 	JOYSTICK_INIT_CHECK();
 	if(!joy)
 		return RAISE(PyExc_SDLError, "Joystick not initialized");
-	if(index < 0 || index >= SDL_JoystickNumBalls(joy))
+	if(_index < 0 || _index >= SDL_JoystickNumBalls(joy))
 		return RAISE(PyExc_SDLError, "Invalid joystick trackball");
 
-	SDL_JoystickGetBall(joy, index, &dx, &dy);
+	SDL_JoystickGetBall(joy, _index, &dx, &dy);
 	return Py_BuildValue("(ii)", dx, dy);
 }
 
 {
 	int joy_id = PyJoystick_AsID(self);
 	SDL_Joystick* joy = joystick_stickdata[joy_id];
-	int index, px, py;
+	int _index, px, py;
 	Uint8 value;
 
-	if(!PyArg_ParseTuple(args, "i", &index))
+	if(!PyArg_ParseTuple(args, "i", &_index))
 		return NULL;
 
 	JOYSTICK_INIT_CHECK();
 	if(!joy)
 		return RAISE(PyExc_SDLError, "Joystick not initialized");
-	if(index < 0 || index >= SDL_JoystickNumHats(joy))
+	if(_index < 0 || _index >= SDL_JoystickNumHats(joy))
 		return RAISE(PyExc_SDLError, "Invalid joystick hat");
 
 	px = py = 0;
-	value = SDL_JoystickGetHat(joy, index);
+	value = SDL_JoystickGetHat(joy, _index);
 	if(value&SDL_HAT_UP) py = 1;
 	else if(value&SDL_HAT_DOWN) py = -1;
 	if(value&SDL_HAT_RIGHT) px = 1;
 static PyObject* snd_fadeout(PyObject* self, PyObject* args)
 {
 	Mix_Chunk* chunk = PySound_AsChunk(self);
-	int time;
-	if(!PyArg_ParseTuple(args, "i", &time))
+	int _time;
+	if(!PyArg_ParseTuple(args, "i", &_time))
 		return NULL;
 
 	MIXER_INIT_CHECK();
 
-	Mix_FadeOutGroup((intptr_t)chunk, time);
+	Mix_FadeOutGroup((intptr_t)chunk, _time);
 	Py_RETURN_NONE;
 }
 
 static PyObject* chan_fadeout(PyObject* self, PyObject* args)
 {
 	int channelnum = PyChannel_AsInt(self);
-	int time;
-	if(!PyArg_ParseTuple(args, "i", &time))
+	int _time;
+	if(!PyArg_ParseTuple(args, "i", &_time))
 		return NULL;
 
 	MIXER_INIT_CHECK();
 
-	Mix_FadeOutChannel(channelnum, time);
+	Mix_FadeOutChannel(channelnum, _time);
 	Py_RETURN_NONE;
 }
 
 
 static PyObject* mixer_fadeout(PyObject* self, PyObject* args)
 {
-	int time;
-	if(!PyArg_ParseTuple(args, "i", &time))
+	int _time;
+	if(!PyArg_ParseTuple(args, "i", &_time))
 		return NULL;
 
 	MIXER_INIT_CHECK();
 
-	Mix_FadeOutChannel(-1, time);
+	Mix_FadeOutChannel(-1, _time);
 	Py_RETURN_NONE;
 }
 
 	music = PyImport_ImportModule("pygame.mixer_music");
         if(music)
 	{
-		PyObject* ptr, *dict;
+		PyObject* ptr, *_dict;
 		PyModule_AddObject(module, "music", music);
-		dict = PyModule_GetDict(music);
-		ptr = PyDict_GetItemString(dict, "_MUSIC_POINTER");
+		_dict = PyModule_GetDict(music);
+		ptr = PyDict_GetItemString(_dict, "_MUSIC_POINTER");
 		current_music = (Mix_Music**)PyCObject_AsVoidPtr(ptr);
-		ptr = PyDict_GetItemString(dict, "_QUEUE_POINTER");
+		ptr = PyDict_GetItemString(_dict, "_QUEUE_POINTER");
 		queue_music = (Mix_Music**)PyCObject_AsVoidPtr(ptr);
 	}
 	else /*music module not compiled? cleanly ignore*/
 #define PyMixer_AutoInit (*(PyObject*(*)(PyObject*, PyObject*))PyMIXER_C_API[5])
 #define PyMixer_AutoQuit (*(void(*)(void))PyMIXER_C_API[6])
 #define import_pygame_mixer() { \
-	PyObject *module = PyImport_ImportModule("pygame.mixer"); \
-	if (module != NULL) { \
-		PyObject *dict = PyModule_GetDict(module); \
-		PyObject *c_api = PyDict_GetItemString(dict, PYGAMEAPI_LOCAL_ENTRY); \
-		if(PyCObject_Check(c_api)) {\
-			void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+	PyObject *_module = PyImport_ImportModule("pygame.mixer"); \
+	if (_module != NULL) { \
+		PyObject *_dict = PyModule_GetDict(_module); \
+		PyObject *_c_api = PyDict_GetItemString(_dict, PYGAMEAPI_LOCAL_ENTRY); \
+		if(PyCObject_Check(_c_api)) {\
+			void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
 			memcpy(PyMIXER_C_API, localptr, sizeof(void*)*PYGAMEAPI_MIXER_NUMSLOTS); \
-} Py_DECREF(module); } }
+} Py_DECREF(_module); } }
 #endif
 
 
 
 static PyObject* music_fadeout(PyObject* self, PyObject* args)
 {
-	int time;
-	if(!PyArg_ParseTuple(args, "i", &time))
+	int _time;
+	if(!PyArg_ParseTuple(args, "i", &_time))
 		return NULL;
 
 	MIXER_INIT_CHECK();
 
-	Mix_FadeOutMusic(time);
+	Mix_FadeOutMusic(_time);
 	if(queue_music)
 	{
 		Mix_FreeMusic(queue_music);
     (*(int(*)(PyObject*, Uint8*))PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 12])
 
 #define import_pygame_base() {                                          \
-	PyObject *module = PyImport_ImportModule("pygame.base");        \
-	if (module != NULL) {                                           \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.base");        \
+	if (_module != NULL) {                                           \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_BASE_NUMSLOTS; ++i)            \
                     PyGAME_C_API[i + PYGAMEAPI_BASE_FIRSTSLOT] = localptr[i]; \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
      PyGAME_C_API[PYGAMEAPI_RECT_FIRSTSLOT + 3])
 
 #define import_pygame_rect() {                                          \
-	PyObject *module = PyImport_ImportModule("pygame.rect");        \
-	if (module != NULL) {                                           \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.rect");        \
+	if (_module != NULL) {                                         \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_RECT_NUMSLOTS; ++i)            \
                     PyGAME_C_API[i + PYGAMEAPI_RECT_FIRSTSLOT] = localptr[i]; \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
     (*(PyObject*(*)(int))PyGAME_C_API[PYGAMEAPI_CDROM_FIRSTSLOT + 1])
 
 #define import_pygame_cd() {                                      \
-	PyObject *module = PyImport_ImportModule("pygame.cdrom"); \
-	if (module != NULL) {                                     \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.cdrom"); \
+	if (_module != NULL) {                                     \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_CDROM_NUMSLOTS; ++i)           \
                     PyGAME_C_API[i + PYGAMEAPI_CDROM_FIRSTSLOT] = localptr[i]; \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
     (*(PyObject*(*)(int))PyGAME_C_API[PYGAMEAPI_JOYSTICK_FIRSTSLOT + 1])
 
 #define import_pygame_joystick() {                                      \
-	PyObject *module = PyImport_ImportModule("pygame.joystick");    \
-	if (module != NULL) {                                           \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.joystick");    \
+	if (_module != NULL) {                                           \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_JOYSTICK_NUMSLOTS; ++i)        \
                     PyGAME_C_API[i + PYGAMEAPI_JOYSTICK_FIRSTSLOT] =    \
                         localptr[i];                                    \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
     (*(PyObject*(*)(SDL_VideoInfo*))                    \
      PyGAME_C_API[PYGAMEAPI_DISPLAY_FIRSTSLOT + 1])
 #define import_pygame_display() {                                   \
-	PyObject *module = PyImport_ImportModule("pygame.display"); \
-	if (module != NULL) {                                       \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.display"); \
+	if (_module != NULL) {                                       \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_DISPLAY_NUMSLOTS; ++i)         \
                     PyGAME_C_API[i + PYGAMEAPI_DISPLAY_FIRSTSLOT] =     \
                         localptr[i];                                    \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
      PyGAME_C_API[PYGAMEAPI_SURFACE_FIRSTSLOT + 2])
 
 #define import_pygame_surface() {                                   \
-	PyObject *module = PyImport_ImportModule("pygame.surface"); \
-	if (module != NULL) {                                       \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.surface"); \
+	if (_module != NULL) {                                       \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_SURFACE_NUMSLOTS; ++i)         \
                     PyGAME_C_API[i + PYGAMEAPI_SURFACE_FIRSTSLOT] =     \
                         localptr[i];                                    \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
-	module = PyImport_ImportModule("pygame.surflock");              \
-	if (module != NULL) {                                           \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	_module = PyImport_ImportModule("pygame.surflock");              \
+	if (_module != NULL) {                                           \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_SURFLOCK_NUMSLOTS; ++i)        \
                     PyGAME_C_API[i + PYGAMEAPI_SURFLOCK_FIRSTSLOT] =    \
                         localptr[i];                                    \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
     (*(int (*)(PyEventObject*, SDL_Event*))             \
      PyGAME_C_API[PYGAMEAPI_EVENT_FIRSTSLOT + 3])
 #define import_pygame_event() {                                   \
-	PyObject *module = PyImport_ImportModule("pygame.event"); \
-	if (module != NULL) {                                     \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.event"); \
+	if (_module != NULL) {                                     \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_EVENT_NUMSLOTS; ++i)           \
                     PyGAME_C_API[i + PYGAMEAPI_EVENT_FIRSTSLOT] = localptr[i]; \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
 #define RWopsCheckPythonThreaded                                        \
     (*(int(*)(SDL_RWops*))PyGAME_C_API[PYGAMEAPI_RWOBJECT_FIRSTSLOT + 3])
 #define import_pygame_rwobject() {                                   \
-	PyObject *module = PyImport_ImportModule("pygame.rwobject"); \
-	if (module != NULL) {                                        \
-            PyObject *dict = PyModule_GetDict(module);                  \
-            PyObject *c_api = PyDict_GetItemString(dict,                \
+	PyObject *_module = PyImport_ImportModule("pygame.rwobject"); \
+	if (_module != NULL) {                                        \
+            PyObject *_dict = PyModule_GetDict(_module);                  \
+            PyObject *_c_api = PyDict_GetItemString(_dict,                \
                                                    PYGAMEAPI_LOCAL_ENTRY); \
-            if(PyCObject_Check(c_api)) {                                \
-                int i; void** localptr = (void**)PyCObject_AsVoidPtr(c_api); \
+            if(PyCObject_Check(_c_api)) {                                \
+                int i; void** localptr = (void**)PyCObject_AsVoidPtr(_c_api); \
                 for(i = 0; i < PYGAMEAPI_RWOBJECT_NUMSLOTS; ++i)        \
                     PyGAME_C_API[i + PYGAMEAPI_RWOBJECT_FIRSTSLOT] =    \
                         localptr[i];                                    \
             }                                                           \
-            Py_DECREF(module);                                          \
+            Py_DECREF(_module);                                          \
         }                                                               \
     }
 #endif
             {
                 int i = 0;
                 int ioffset = 0;
-                int length = 0;
                 char *tmp;
 
                 free (retval);
                 {
                     length = strlen (list[i]);
                     tmp = retval;
-                    retval = realloc (retval, length + 1);
+                    retval = realloc (retval, (*length) + 1);
                     if (!retval)
                     {
                         free (tmp);
                         return NULL;
                     }
-                    ioffset += length;
+                    ioffset += *length;
 
-                    memcpy (retval, list[i], length);
+                    memcpy (retval, list[i], *length);
                     memset (retval + ioffset, '\n', 1);
                 }
                 memset (retval + ioffset, 0, 1);
     SDL_Surface* surf = PySurface_AsSurface(self);
     SDL_Palette* pal = surf->format->palette;
     SDL_Color* c;
-    int index;
+    int _index;
     
-    if(!PyArg_ParseTuple(args, "i", &index))
+    if(!PyArg_ParseTuple(args, "i", &_index))
         return NULL;
     if(!surf)
         return RAISE(PyExc_SDLError, "display Surface quit");
 
     if(!pal)
         return RAISE(PyExc_SDLError, "Surface has no palette to set\n");
-    if(index >= pal->ncolors || index < 0)
+    if(_index >= pal->ncolors || _index < 0)
         return RAISE(PyExc_IndexError, "index out of bounds");
     
-    c = &pal->colors[index];
+    c = &pal->colors[_index];
     return Py_BuildValue("(bbb)", c->r, c->g, c->b);
 }
 
     SDL_Surface* surf = PySurface_AsSurface(self);
     SDL_Palette* pal = surf->format->palette;
     SDL_Color color;
-    int index;
+    int _index;
     Uint8 r, g, b;
     
-    if(!PyArg_ParseTuple(args, "i(bbb)", &index, &r, &g, &b))
+    if(!PyArg_ParseTuple(args, "i(bbb)", &_index, &r, &g, &b))
         return NULL;
     if(!surf)
         return RAISE(PyExc_SDLError, "display Surface quit");
         return NULL;
     }
     
-    if(index >= pal->ncolors || index < 0)
+    if(_index >= pal->ncolors || _index < 0)
     {
         PyErr_SetString(PyExc_IndexError, "index out of bounds");
         return NULL;
     color.g = g;
     color.b = b;
     
-    SDL_SetColors(surf, &color, index, 1);
+    SDL_SetColors(surf, &color, _index, 1);
     
     Py_RETURN_NONE;
 }
     lockmodule = PyImport_ImportModule("pygame.surflock");
     if(lockmodule != NULL)
     {
-        PyObject *dict = PyModule_GetDict(lockmodule);
-        PyObject *c_api = PyDict_GetItemString(dict, PYGAMEAPI_LOCAL_ENTRY);
-        if(PyCObject_Check(c_api))
+        PyObject *_dict = PyModule_GetDict(lockmodule);
+        PyObject *_c_api = PyDict_GetItemString(_dict, PYGAMEAPI_LOCAL_ENTRY);
+        if(PyCObject_Check(_c_api))
         {
-            int i; void** localptr = (void*)PyCObject_AsVoidPtr(c_api);
+            int i; void** localptr = (void*)PyCObject_AsVoidPtr(_c_api);
             for(i = 0; i < PYGAMEAPI_SURFLOCK_NUMSLOTS; ++i)
                 PyGAME_C_API[i + PYGAMEAPI_SURFLOCK_FIRSTSLOT] = localptr[i];
         }
 static PyObject* clock_tick_base(PyObject* self, PyObject* arg,
                                  int use_accurate_delay)
 {
-    PyClockObject* clock = (PyClockObject*)self;
+    PyClockObject* _clock = (PyClockObject*)self;
     float framerate = 0.0f;
     int nowtime;
     
     if(framerate)
     {
         int delay, endtime = (int)((1.0f/framerate) * 1000.0f);
-        clock->rawpassed = SDL_GetTicks() - clock->last_tick;
-        delay = endtime - clock->rawpassed;
+        _clock->rawpassed = SDL_GetTicks() - _clock->last_tick;
+        delay = endtime - _clock->rawpassed;
         
         /*just doublecheck that timer is initialized*/
         if(!SDL_WasInit(SDL_INIT_TIMER))
     }
         
     nowtime = SDL_GetTicks();
-    clock->timepassed = nowtime - clock->last_tick;
-    clock->fps_count += 1;
-    clock->last_tick = nowtime;
+    _clock->timepassed = nowtime - _clock->last_tick;
+    _clock->fps_count += 1;
+    _clock->last_tick = nowtime;
     if(!framerate)
-        clock->rawpassed = clock->timepassed;
+        _clock->rawpassed = _clock->timepassed;
     
-    if(!clock->fps_tick)
+    if(!_clock->fps_tick)
     {
-        clock->fps_count = 0;
-        clock->fps_tick = nowtime;
+        _clock->fps_count = 0;
+        _clock->fps_tick = nowtime;
     }
-    else if(clock->fps_count >= 10)
+    else if(_clock->fps_count >= 10)
     {
-        clock->fps = clock->fps_count /
-            ((nowtime - clock->fps_tick) / 1000.0f);
-        clock->fps_count = 0;
-        clock->fps_tick = nowtime;
-        Py_XDECREF(clock->rendered);
+        _clock->fps = _clock->fps_count /
+            ((nowtime - _clock->fps_tick) / 1000.0f);
+        _clock->fps_count = 0;
+        _clock->fps_tick = nowtime;
+        Py_XDECREF(_clock->rendered);
     }
-    return PyInt_FromLong(clock->timepassed);
+    return PyInt_FromLong(_clock->timepassed);
 }
 
 static PyObject* clock_tick(PyObject* self, PyObject* arg) 
 
 static PyObject* clock_get_fps(PyObject* self, PyObject* arg)
 {
-    PyClockObject* clock = (PyClockObject*)self;
-    return PyFloat_FromDouble(clock->fps);
+    PyClockObject* _clock = (PyClockObject*)self;
+    return PyFloat_FromDouble(_clock->fps);
 }
 
 static PyObject* clock_get_time(PyObject* self, PyObject* arg)
 {
-    PyClockObject* clock = (PyClockObject*)self;
-    return PyInt_FromLong(clock->timepassed);
+    PyClockObject* _clock = (PyClockObject*)self;
+    return PyInt_FromLong(_clock->timepassed);
 }
 
 static PyObject* clock_get_rawtime(PyObject* self, PyObject* arg)
 {
-    PyClockObject* clock = (PyClockObject*)self;
-    return PyInt_FromLong(clock->rawpassed);
+    PyClockObject* _clock = (PyClockObject*)self;
+    return PyInt_FromLong(_clock->rawpassed);
 }
 
 #if 0
 this adds up to a lot of messy code. we'll wait on this one*/
 static PyObject* clock_render_fps(PyObject* self, PyObject* arg)
 {
-    PyClockObject* clock = (PyClockObject*)self;
+    PyClockObject* _clock = (PyClockObject*)self;
     char message[256];
     static int initialized = 0;
     
             Py_DECREF(func);
             func = PyObject_GetAttrString(result, "render");
             Py_DECREF(result);
-            sprintf(message, "fps: %.2f", clock->fps);
+            sprintf(message, "fps: %.2f", _clock->fps);
             result = PyObject_CallFunction(func, "si(iii)(iii)",
                                            message, 0, 255, 255, 255, 0, 0, 0);
             /**** BLIT IMG ONTO A PRESET IMAGE SIZE AND RETURN IT ****/
 
 static void clock_dealloc(PyObject* self)
 {
-    PyClockObject* clock = (PyClockObject*)self;
-    Py_XDECREF(clock->rendered);
+    PyClockObject* _clock = (PyClockObject*)self;
+    Py_XDECREF(_clock->rendered);
     PyObject_DEL(self);	
 }
 
 PyObject* clock_str(PyObject* self)
 {
     char str[1024];
-    PyClockObject* clock = (PyClockObject*)self;
+    PyClockObject* _clock = (PyClockObject*)self;
     
-    sprintf(str, "<Clock(fps=%.2f)>", (float)clock->fps);
+    sprintf(str, "<Clock(fps=%.2f)>", (float)_clock->fps);
     
     return PyString_FromString(str);
 }
 
 PyObject* ClockInit(PyObject* self, PyObject* arg)
 {
-    PyClockObject* clock;
+    PyClockObject* _clock;
     
     if(!PyArg_ParseTuple(arg, ""))
         return NULL;
     
-    clock = PyObject_NEW(PyClockObject, &PyClock_Type);
-    if(!clock)
+    _clock = PyObject_NEW(PyClockObject, &PyClock_Type);
+    if(!_clock)
         return NULL;
     
     /*just doublecheck that timer is initialized*/
             return RAISE(PyExc_SDLError, SDL_GetError());
     }
     
-    clock->fps_tick = 0;
-    clock->last_tick = SDL_GetTicks();
-    clock->fps = 0.0f;
-    clock->fps_count = 0;
-    clock->rendered = NULL;
+    _clock->fps_tick = 0;
+    _clock->last_tick = SDL_GetTicks();
+    _clock->fps = 0.0f;
+    _clock->fps_count = 0;
+    _clock->rendered = NULL;
     
-    return (PyObject*)clock;
+    return (PyObject*)_clock;
 }
 static PyMethodDef time_builtins[] =
 {