Index: /anuga_core/source/anuga/mesh_engine/mesh_engine.py
===================================================================
--- /anuga_core/source/anuga/mesh_engine/mesh_engine.py	(revision 4899)
+++ /anuga_core/source/anuga/mesh_engine/mesh_engine.py	(revision 4900)
@@ -130,6 +130,7 @@
     #XSprint "mode", mode
     #print "yeah" 
-    mesh_dict, trianglelist, pointlist, pointmarkerlist, pointattributelist, triangleattributelist, segmentlist, segmentmarkerlist, neighborlist = triang.genMesh(points,segments,holes,regions,
+    trianglelist, pointlist, pointmarkerlist, pointattributelist, triangleattributelist, segmentlist, segmentmarkerlist, neighborlist = triang.genMesh(points,segments,holes,regions,
                           pointatts,segatts, mode, segments.flat)
+    mesh_dict = {}
     # the values as arrays
     mesh_dict['generatedtrianglelist'] = trianglelist
Index: /anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c
===================================================================
--- /anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c	(revision 4899)
+++ /anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c	(revision 4900)
@@ -115,10 +115,5 @@
      
   char *mod;
-  PyObject *holder, *holderlist, *attributelist;
-  int listsize,attsize ;
-  PyObject  *ii;
-  
-  /* used for testing numeric arrays*/
-  int n_test;     
+    
   if(!PyArg_ParseTuple(args,(char *)"OOOOOOOO",&pointlist,&seglist,&holelist,&regionlist,&pointattributelist,&segmarkerlist,&mode,&test)){
     return NULL;
@@ -234,6 +229,5 @@
     we send back a dictionary:                                               
     { index : [ coordinates, [connections], Attribute ] } 
-  */
-  holder = PyDict_New();    
+  */  
  
   /*
@@ -260,17 +254,4 @@
   gentrianglelist -> data = out.trianglelist;
     
-  /* Add triangle list */
-  listsize = out.numberoftriangles;
-  /* printf(" out.numberoftriangles %i\n", out.numberoftriangles ); */
-  holderlist = PyList_New(listsize);
-  for(i=0; i<listsize;i++){
-    PyObject *mlist = Py_BuildValue((char *)"(i,i,i)", 
-				    out.trianglelist[i*3  ], out.trianglelist [i*3+1], out.trianglelist [i*3+2]);    
-    PyList_SetItem(holderlist,i, mlist);
-  }    
-  ii=PyString_FromString("generatedtrianglelist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); Py_DECREF(holderlist);
-  
-  
   /* Add pointlist */
   dimensions[0] = out.numberofpoints;
@@ -285,17 +266,5 @@
   
   */
-  genpointlist -> data = out.pointlist;
-     
-  /* Add pointlist */
-  listsize = out.numberofpoints;
-  holderlist = PyList_New(listsize);
-     
-  for(i=0; i<out.numberofpoints;i++){
-    PyObject *mlist = Py_BuildValue((char *)"(d,d)", 
-				    out.pointlist[i*2  ], out.pointlist[i*2+1]);  
-    PyList_SetItem(holderlist,i, mlist);
-  }  
-  ii=PyString_FromString("generatedpointlist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); Py_DECREF(holderlist);
+   genpointlist -> data = out.pointlist;
   
   /* Add point marker list */
@@ -306,16 +275,4 @@
   genpointmarkerlist -> data = out.pointmarkerlist;
   
-  /* Add point marker list */
-  listsize = out.numberofpoints;
-  holderlist = PyList_New(listsize);
-  
-  for(i=0; i<listsize;i++){
-    PyObject *mlist = Py_BuildValue((char *)"i", 
-				    out.pointmarkerlist[i]);     
-    PyList_SetItem(holderlist,i, mlist); 
-  }  
-  ii=PyString_FromString("generatedpointmarkerlist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); Py_DECREF(holderlist);
-    
   /* Add point attribute list */
   dimensions[0] = out.numberofpoints;
@@ -327,20 +284,4 @@
   
   
-  /* Add point attribute list */
-  listsize = out.numberofpoints;
-  holderlist = PyList_New(listsize);
-  
-  for(i=0; i<listsize;i++){
-    attsize = out.numberofpointattributes;
-    attributelist = PyList_New(attsize);
-    for(iatt=0; iatt<attsize;iatt++){
-      PyObject *mlist = Py_BuildValue((char *)"d", 
-				      out.pointattributelist[i*attsize + iatt]);     
-      PyList_SetItem(attributelist,iatt, mlist);
-    }      
-    PyList_SetItem(holderlist,i, attributelist);
-  }  
-  ii=PyString_FromString("generatedpointattributelist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); Py_DECREF(holderlist);  
  
   /* Add triangle attribute list */
@@ -352,20 +293,4 @@
   gentriangleattributelist -> data = out.triangleattributelist;
   
-  /* Add triangle attribute list */
-  listsize = out.numberoftriangles;
-  holderlist = PyList_New(listsize);
-     
-  for(i=0; i<listsize; i++){
-    attsize = out.numberoftriangleattributes;
-    attributelist = PyList_New(attsize);       
-    for(iatt=0; iatt<attsize;iatt++){
-      PyObject *mlist = Py_BuildValue((char *)"d",out.triangleattributelist[i*attsize + iatt]);  
-      PyList_SetItem(attributelist,iatt, mlist);
-    }      
-    PyList_SetItem(holderlist,i, attributelist);
-  }  
-  ii=PyString_FromString("generatedtriangleattributelist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); Py_DECREF(holderlist);
-  
   /* Add segment list */
   dimensions[0] = out.numberofsegments;
@@ -377,16 +302,4 @@
   
   
-  /* Add segment list */
-  listsize = out.numberofsegments;
-  holderlist = PyList_New(listsize);
-  for(i=0; i<listsize;i++){
-    PyObject *mlist = Py_BuildValue((char *)"(i,i)", 
-				    out.segmentlist[i*2  ],
-				    out.segmentlist [i*2+1]);
-    PyList_SetItem(holderlist,i, mlist);
-  }    
-  ii=PyString_FromString("generatedsegmentlist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); Py_DECREF(holderlist);  
-  
   /* Add segment marker list */
   dimensions[0] = out.numberofsegments;
@@ -395,17 +308,4 @@
 						    PyArray_INT);
   gensegmentmarkerlist -> data = out.segmentmarkerlist;
-  
-  
-  /* Add segment marker list */
-  listsize = out.numberofsegments;
-  holderlist = PyList_New(listsize);
-  for(i=0; i<listsize;i++){
-    PyObject *mlist = Py_BuildValue((char *)"i", 
-				    out.segmentmarkerlist[i]);
-    PyList_SetItem(holderlist,i, mlist);
-  }    
-  ii=PyString_FromString("generatedsegmentmarkerlist");
-  PyDict_SetItem(holder, ii, holderlist); Py_DECREF(ii); 
-  Py_DECREF(holderlist);  
   
   /* Add triangle neighbor list */
@@ -419,5 +319,5 @@
   
   /* Add triangle neighbor list */
-  if (out.neighborlist != NULL) {
+  /*if (out.neighborlist != NULL) {
     listsize = out.numberoftriangles;
     holderlist = PyList_New(listsize);
@@ -433,5 +333,5 @@
     Py_DECREF(ii); Py_DECREF(holderlist);
   }   
-  
+   */
   
   
@@ -481,5 +381,5 @@
   
   /* R = Py_BuildValue((char *)"O", holder); */
-  R = Py_BuildValue((char *)"OOOOOOOOO", holder 
+  R = Py_BuildValue((char *)"OOOOOOOO"
 		    ,PyArray_Return(gentrianglelist)
 		    ,PyArray_Return(genpointlist)
@@ -491,5 +391,5 @@
 		    ,PyArray_Return(genneighborlist)
 		    );
-  Py_DECREF(holder); /** This fixed a  memory problem ticket#189 */
+   /*Py_DECREF(holder);* This fixed a  memory problem ticket#189 */
   Py_DECREF(gentrianglelist);
   Py_DECREF(genpointlist);
