Index: src/_backend_agg.cpp
===================================================================
--- src/_backend_agg.cpp	(revision 2138)
+++ src/_backend_agg.cpp	(working copy)
@@ -379,10 +379,10 @@
     return Py::Object();
 
 
-  // dump the x.y vertices into a double array for faster look ahread
+  // dump the x.y vertices into a double array for faster look ahead
   // and behind access
-  double xs[Npoints];
-  double ys[Npoints];
+  double *xs = new double[Npoints];
+  double *ys = new double[Npoints];
 
   for (size_t i=0; i<Npoints; i++) {
     Py::SeqBase<Py::Object> xy(points[i]);
@@ -406,6 +406,10 @@
   path.close_polygon();
 
   _fill_and_stroke(path, gc, face, false);
+
+  delete [] xs;
+  delete [] ys;
+
   _VERBOSE("RendererAgg::draw_polygon DONE");
   return Py::Object();
 
@@ -960,10 +964,10 @@
       double xo = Py::Float(pos[0]);
       double yo = Py::Float(pos[1]);
       try {
-	xyo = transOffset->operator()(xo, yo);
+         xyo = transOffset->operator()(xo, yo);
       }
       catch (...) {
-	throw Py::ValueError("Domain error on transOffset->operator in draw_line_collection");
+         throw Py::ValueError("Domain error on transOffset->operator in draw_line_collection");
       }
 
     }
@@ -976,22 +980,25 @@
 
     // dump the verts to double arrays so we can do more efficient
     // look aheads and behinds when doing snapto pixels
-    double xs[Nverts], ys[Nverts];
+    double *xs = new double[Nverts];
+    double *ys = new double[Nverts];
     for (size_t j=0; j<Nverts; j++) {
       thisvert = thisverts[j];
       double x = Py::Float(thisvert[0]);
       double y = Py::Float(thisvert[1]);
       try {
-	xy = transform->operator()(x, y);
+         xy = transform->operator()(x, y);
       }
       catch(...) {
-	throw Py::ValueError("Domain error on eval_scalars in RendererAgg::draw_poly_collection");
+         delete [] xs;
+         delete [] ys;
+         throw Py::ValueError("Domain error on eval_scalars in RendererAgg::draw_poly_collection");
       }
 
 
       if (usingOffsets) {
-	xy.first  += xyo.first;
-	xy.second += xyo.second;
+         xy.first  += xyo.first;
+         xy.second += xyo.second;
       }
 
       xy.second = height - xy.second;
@@ -1006,21 +1013,21 @@
       double y = ys[j];
 
       if (j==0) {
-	if (xs[j] == xs[Nverts-1]) x = (int)xs[j] + 0.5;
-	if (ys[j] == ys[Nverts-1]) y = (int)ys[j] + 0.5;
+         if (xs[j] == xs[Nverts-1]) x = (int)xs[j] + 0.5;
+         if (ys[j] == ys[Nverts-1]) y = (int)ys[j] + 0.5;
       }
       else if (j==Nverts-1) {
-	if (xs[j] == xs[0]) x = (int)xs[j] + 0.5;
-	if (ys[j] == ys[0]) y = (int)ys[j] + 0.5;
+         if (xs[j] == xs[0]) x = (int)xs[j] + 0.5;
+         if (ys[j] == ys[0]) y = (int)ys[j] + 0.5;
       }
 
       if (j < Nverts-1) {
-	if (xs[j] == xs[j+1]) x = (int)xs[j] + 0.5;
-	if (ys[j] == ys[j+1]) y = (int)ys[j] + 0.5;
+         if (xs[j] == xs[j+1]) x = (int)xs[j] + 0.5;
+         if (ys[j] == ys[j+1]) y = (int)ys[j] + 0.5;
       }
       if (j>0) {
-	if (xs[j] == xs[j-1]) x = (int)xs[j] + 0.5;
-	if (ys[j] == ys[j-1]) y = (int)ys[j] + 0.5;
+         if (xs[j] == xs[j-1]) x = (int)xs[j] + 0.5;
+         if (ys[j] == ys[j-1]) y = (int)ys[j] + 0.5;
       }
 
       if (j==0) path.move_to(x,y);
@@ -1041,12 +1048,12 @@
       theRasterizer->add_path(path);
 
       if (isaa) {
-	rendererAA->color(facecolor);
-	agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+         rendererAA->color(facecolor);
+         agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
       }
       else {
-	rendererBin->color(facecolor);
-	agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
+         rendererBin->color(facecolor);
+         agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
       }
     } //renderer face
 
@@ -1069,15 +1076,18 @@
 
       // render antialiased or not
       if ( isaa ) {
-	rendererAA->color(edgecolor);
-	agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+         rendererAA->color(edgecolor);
+         agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
       }
       else {
-	rendererBin->color(edgecolor);
-	agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
+         rendererBin->color(edgecolor);
+         agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
       }
     } //rendered edge
 
+    delete [] xs;
+    delete [] ys;
+
   } // for every poly
   return Py::Object();
 }
@@ -1127,8 +1137,8 @@
   double thisx, thisy;
 
   // dump the x.y vertices into a double array for faster access
-  double xverts[Nverts];
-  double yverts[Nverts];
+  double *xverts = new double[Nverts];
+  double *yverts = new double[Nverts];
   Py::SeqBase<Py::Object> xy;
   for (size_t i=0; i<Nverts; i++) {
     xy = Py::SeqBase<Py::Object>(verts[i]);
@@ -1145,6 +1155,8 @@
       offsetPair = transOffset->operator()(xo, yo);
     }
     catch(...) {
+      delete [] xverts;
+      delete [] yverts;
       throw Py::ValueError("Domain error on eval_scalars in RendererAgg::draw_regpoly_collection");
     }
 
@@ -1178,12 +1190,12 @@
       theRasterizer->add_path(path);
 
       if (isaa) {
-	rendererAA->color(facecolor);
-	agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+         rendererAA->color(facecolor);
+         agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
       }
       else {
-	rendererBin->color(facecolor);
-	agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
+         rendererBin->color(facecolor);
+         agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
       }
     } //renderer face
 
@@ -1205,16 +1217,18 @@
 
       // render antialiased or not
       if ( isaa ) {
-	rendererAA->color(edgecolor);
-	agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+         rendererAA->color(edgecolor);
+         agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
       }
       else {
-	rendererBin->color(edgecolor);
-	agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
+         rendererBin->color(edgecolor);
+         agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
       }
     } //rendered edge
 
   } // for every poly
+  delete [] xverts;
+  delete [] yverts;
   return Py::Object();
 }
 
@@ -1355,7 +1369,7 @@
 
   //path_t transpath(path, xytrans);
 
-  if (gc.dasha==NULL ) { //no dashes    
+  if (gc.dasha==NULL ) { //no dashes
     stroke_t stroke(path);
     stroke.width(gc.linewidth);
     stroke.line_cap(gc.cap);
@@ -1920,19 +1934,22 @@
   struct        png_color_8_struct sig_bit;
   png_uint_32 row;
 
-  png_bytep row_pointers[height];
+  png_bytep *row_pointers = new png_bytep[height];
   for (row = 0; row < height; ++row) {
     row_pointers[row] = pixBuffer + row * width * 4;
   }
 
 
-  if (fp == NULL)
+  if (fp == NULL) {
+    delete [] row_pointers;
     throw Py::RuntimeError("Could not open file");
+  }
 
 
   png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
   if (png_ptr == NULL) {
     if (fpclose) fclose(fp);
+    delete [] row_pointers;
     throw Py::RuntimeError("Could not create write struct");
   }
 
@@ -1940,12 +1957,14 @@
   if (info_ptr == NULL) {
     if (fpclose) fclose(fp);
     png_destroy_write_struct(&png_ptr, &info_ptr);
+    delete [] row_pointers;
     throw Py::RuntimeError("Could not create info struct");
   }
 
   if (setjmp(png_ptr->jmpbuf)) {
     if (fpclose) fclose(fp);
     png_destroy_write_struct(&png_ptr, &info_ptr);
+    delete [] row_pointers;
     throw Py::RuntimeError("Error building image");
   }
 
@@ -1975,6 +1994,7 @@
 
   png_destroy_write_struct(&png_ptr, &info_ptr);
 
+  delete [] row_pointers;
 
   if (fpclose) fclose(fp);
 
Index: src/cntr.c
===================================================================
--- src/cntr.c	(revision 2138)
+++ src/cntr.c	(working copy)
@@ -1548,13 +1548,13 @@
 static int
 Cntr_init(Cntr *self, PyObject *args, PyObject *kwds)
 {
+    static char *kwlist[] = {"x", "y", "z", "mask", NULL};
     PyObject *xarg, *yarg, *zarg, *marg;
     PyArrayObject *xpa, *ypa, *zpa, *mpa;
     long iMax, jMax;
     char *mask;
 
     marg = NULL;
-    static char *kwlist[] = {"x", "y", "z", "mask", NULL};
 
     if (! PyArg_ParseTupleAndKeywords(args, kwds, "OOO|O", kwlist,
                                       &xarg, &yarg, &zarg, &marg))
Index: src/_image.cpp
===================================================================
--- src/_image.cpp	(revision 2138)
+++ src/_image.cpp	(working copy)
@@ -629,13 +629,15 @@
   png_uint_32 row=0;
 
   //todo: allocate on heap
-  png_bytep row_pointers[rowsOut];
+  png_bytep *row_pointers = new png_bytep[rowsOut];
+
   for (row = 0; row < rowsOut; ++row)
     row_pointers[row] = bufpair.first + row * colsOut * 4;
 
   fp = fopen(file_name, "wb");
   if (fp == NULL) {
     if (bufpair.second) delete [] bufpair.first;
+    delete [] row_pointers;
     throw Py::RuntimeError(Printf("Could not open file %s", file_name).str());
   }
 
@@ -644,6 +646,7 @@
   if (png_ptr == NULL) {
     if (bufpair.second) delete [] bufpair.first;
     fclose(fp);
+    delete [] row_pointers;
     throw Py::RuntimeError("Could not create write struct");
   }
 
@@ -652,6 +655,7 @@
     if (bufpair.second) delete [] bufpair.first;
     fclose(fp);
     png_destroy_write_struct(&png_ptr, &info_ptr);
+    delete [] row_pointers;
     throw Py::RuntimeError("Could not create info struct");
   }
 
@@ -659,6 +663,7 @@
     if (bufpair.second) delete [] bufpair.first;
     fclose(fp);
     png_destroy_write_struct(&png_ptr, &info_ptr);
+    delete [] row_pointers;
     throw Py::RuntimeError("Error building image");
   }
 
@@ -683,6 +688,8 @@
   png_destroy_write_struct(&png_ptr, &info_ptr);
   fclose(fp);
 
+  delete [] row_pointers;
+
   if (bufpair.second) delete [] bufpair.first;
   return Py::Object();
 }
@@ -886,7 +893,7 @@
   if (setjmp(png_jmpbuf(png_ptr)))
     throw Py::RuntimeError("_image_module::readpng: error during read_image");
 
-  png_bytep row_pointers[height];
+  png_bytep *row_pointers = new png_bytep[height];
 
   for (png_uint_32 row = 0; row < height; row++)
     row_pointers[row] = new png_byte[png_get_rowbytes(png_ptr,info_ptr)];
@@ -923,6 +930,7 @@
   fclose(fp);
   for (png_uint_32 row = 0; row < height; row++)
     delete [] row_pointers[row];
+  delete [] row_pointers;
   return Py::asObject((PyObject*)A);
 }
 
