Index: trunk/src/python/PyRpUnits.cc
===================================================================
--- trunk/src/python/PyRpUnits.cc	(revision 68)
+++ trunk/src/python/PyRpUnits.cc	(revision 71)
@@ -5,26 +5,7 @@
 
 typedef struct {
-	PyObject_HEAD
-	RpUnits* rp_unit;
+    PyObject_HEAD
+    RpUnits* rp_unit;
 } RpUnitsObject;
-
-// static PyTypeObject RpUnitsObjectType;
-
-/* Xxo methods */
-/*
- * moved this below because forward declaration of RpUnitsObjectType
- * was causing compiler errors ???
- *
-static RpUnitsObject*
-newRpUnitsObject(PyObject *arg)
-{
-	RpUnitsObject* self;
-	self = PyObject_New(RpUnitsObject, &RpUnitsObjectType);
-	if (self == NULL)
-		return NULL;
-	self->rp_unit = NULL;
-	return self;
-}
-*/
 
 static void
@@ -36,6 +17,5 @@
             // delete(self->rp_unit);
         }
-    
-	    PyObject_Del(self);
+        PyObject_Del(self);
     }
 }
@@ -118,8 +98,8 @@
     {"getExponent", (PyCFunction)RpUnitsObject_getExponent, METH_NOARGS,
      "Return the exponent of the RpUnitsObject" },
-	{"convert", (PyCFunction)RpUnitsObject_convert, METH_VARARGS,
-	 "convert a value from one RpUnits Object to another" },
-	{"makeBasis", (PyCFunction)RpUnitsObject_makeBasis, METH_VARARGS,
-	 "return the basis value of the value provided" },
+    {"convert", (PyCFunction)RpUnitsObject_convert, METH_VARARGS,
+     "convert a value from one RpUnits Object to another" },
+    {"makeBasis", (PyCFunction)RpUnitsObject_makeBasis, METH_VARARGS,
+     "return the basis value of the value provided" },
     
     {NULL}  /* Sentinel */
@@ -127,49 +107,49 @@
 
 static PyTypeObject RpUnitsObjectType = {
-	/* The ob_type field must be initialized in the module init function
-	 * to be portable to Windows without using C++. */
-	PyObject_HEAD_INIT(NULL)
-	0,			                        /*ob_size*/
-	"RpUnits.RpUnitsObject",		    /*tp_name*/
-	sizeof(RpUnitsObject),	            /*tp_basicsize*/
-	0,			                        /*tp_itemsize*/
-	/* methods */
-	(destructor)RpUnitsObject_dealloc,  /*tp_dealloc*/
-	0,			                        /*tp_print*/
-	0,                                  /*tp_getattr*/
-	0,                                  /*tp_setattr*/
-	0,			                        /*tp_compare*/
-	0,			                        /*tp_repr*/
-	0,			                        /*tp_as_number*/
-	0,			                        /*tp_as_sequence*/
-	0,			                        /*tp_as_mapping*/
-	0,			                        /*tp_hash*/
-    0,                                  /*tp_call*/
-    0,                                  /*tp_str*/
-    0,                                  /*tp_getattro*/
-    0,                                  /*tp_setattro*/
-    0,                                  /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,     /*tp_flags*/
-    "RpUnits Object",                   /*tp_doc*/
-    0,                                  /*tp_traverse*/
-    0,                                  /*tp_clear*/
-    0,                                  /*tp_richcompare*/
-    0,                                  /*tp_weaklistoffset*/
-    0,                                  /*tp_iter*/
-    0,                                  /*tp_iternext*/
-    RpUnitsObject_methods,              /* tp_methods */
-    0,                                  /*tp_members*/
-    0,                                  /*tp_getset*/
-    0,                                  /*tp_base*/
-    0,                                  /*tp_dict*/
-    0,                                  /*tp_descr_get*/
-    0,                                  /*tp_descr_set*/
-    0,                                  /*tp_dictoffset*/
-    0,                                  /*tp_init*/
-    0,                                  /*tp_alloc*/
-    // RpUnitsObject_new,                  /*tp_new*/
-    0,                                  /*tp_new*/
-    0,                                  /*tp_free*/
-    0,                                  /*tp_is_gc*/
+    /* The ob_type field must be initialized in the module init function
+     * to be portable to Windows without using C++. */
+    PyObject_HEAD_INIT(NULL)
+    0,                                    /*ob_size*/
+    "RpUnits.RpUnitsObject",              /*tp_name*/
+    sizeof(RpUnitsObject),                /*tp_basicsize*/
+    0,                                    /*tp_itemsize*/
+    /* methods */
+    (destructor)RpUnitsObject_dealloc,    /*tp_dealloc*/
+    0,                                    /*tp_print*/
+    0,                                    /*tp_getattr*/
+    0,                                    /*tp_setattr*/
+    0,                                    /*tp_compare*/
+    0,                                    /*tp_repr*/
+    0,                                    /*tp_as_number*/
+    0,                                    /*tp_as_sequence*/
+    0,                                    /*tp_as_mapping*/
+    0,                                    /*tp_hash*/
+    0,                                    /*tp_call*/
+    0,                                    /*tp_str*/
+    0,                                    /*tp_getattro*/
+    0,                                    /*tp_setattro*/
+    0,                                    /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,   /*tp_flags*/
+    "RpUnits Object",                     /*tp_doc*/
+    0,                                    /*tp_traverse*/
+    0,                                    /*tp_clear*/
+    0,                                    /*tp_richcompare*/
+    0,                                    /*tp_weaklistoffset*/
+    0,                                    /*tp_iter*/
+    0,                                    /*tp_iternext*/
+    RpUnitsObject_methods,                /* tp_methods */
+    0,                                    /*tp_members*/
+    0,                                    /*tp_getset*/
+    0,                                    /*tp_base*/
+    0,                                    /*tp_dict*/
+    0,                                    /*tp_descr_get*/
+    0,                                    /*tp_descr_set*/
+    0,                                    /*tp_dictoffset*/
+    0,                                    /*tp_init*/
+    0,                                    /*tp_alloc*/
+    // RpUnitsObject_new,                 /*tp_new*/
+    0,                                    /*tp_new*/
+    0,                                    /*tp_free*/
+    0,                                    /*tp_is_gc*/
 };
 
@@ -177,10 +157,10 @@
 newRpUnitsObject(PyObject *arg)
 {
-	RpUnitsObject* self;
-	self = PyObject_New(RpUnitsObject, &RpUnitsObjectType);
-	if (self == NULL)
-		return NULL;
-	self->rp_unit = NULL;
-	return self;
+    RpUnitsObject* self;
+    self = PyObject_New(RpUnitsObject, &RpUnitsObjectType);
+    if (self == NULL)
+        return NULL;
+    self->rp_unit = NULL;
+    return self;
 }
 
@@ -248,5 +228,5 @@
 RpUnits_define(PyObject *self, PyObject *args)
 {
-	RpUnitsObject* newRpUnit;
+    RpUnitsObject* newRpUnit;
     RpUnitsObject* basis = NULL;
     char* unitsName;
@@ -260,8 +240,8 @@
     }
 
-	newRpUnit = newRpUnitsObject(args);
-
-	if (newRpUnit == NULL)
-		return NULL;
+    newRpUnit = newRpUnitsObject(args);
+
+    if (newRpUnit == NULL)
+        return NULL;
 
 
@@ -280,5 +260,5 @@
     }
 
-	return (PyObject *)newRpUnit;
+    return (PyObject *)newRpUnit;
 }
 
@@ -288,10 +268,4 @@
     
     if ((PyObject*)fxnPtr != NULL) {
-        /*
-        retVal = PyObject_CallFunctionObjArgs(  (PyObject*)fxnPtr,
-                                                (PyObject*)args, 
-                                                NULL    );
-        */
-
         retVal = PyObject_CallObject((PyObject*)fxnPtr,(PyObject*)args);
     }
@@ -311,6 +285,6 @@
 RpUnits_defineConv(PyObject *self, PyObject *args)
 {
-	RpUnitsObject* fromUnit = NULL;
-	RpUnitsObject* toUnit = NULL;
+    RpUnitsObject* fromUnit = NULL;
+    RpUnitsObject* toUnit = NULL;
     PyObject* forwConvFxnStr = NULL;
     PyObject* backConvFxnStr = NULL;
@@ -373,5 +347,5 @@
     }
 
-	return (PyObject *)newRpUnit;
+    return (PyObject *)newRpUnit;
 }
 
@@ -386,5 +360,5 @@
 {
     char* searchUnits = NULL;
-	RpUnits* foundUnits = NULL;
+    RpUnits* foundUnits = NULL;
     RpUnitsObject* returnUnits = NULL;
 
@@ -502,20 +476,20 @@
 static PyMethodDef RpUnits_Methods[] = {
 
-	{"define", RpUnits_define, METH_VARARGS,
+    {"define", RpUnits_define, METH_VARARGS,
         RpUnits_define_doc},
 
-	{"defineConv", RpUnits_defineConv, METH_VARARGS,
+    {"defineConv", RpUnits_defineConv, METH_VARARGS,
         RpUnits_defineConv_doc},
     
-	{"find", RpUnits_find, METH_VARARGS,
+    {"find", RpUnits_find, METH_VARARGS,
         RpUnits_find_doc},
 
-	{"makeMetric", RpUnits_makeMetric, METH_VARARGS,
+    {"makeMetric", RpUnits_makeMetric, METH_VARARGS,
         RpUnits_makeMetric_doc},
     
-	{"convert", (PyCFunction)RpUnits_convert, METH_VARARGS|METH_KEYWORDS,
+    {"convert", (PyCFunction)RpUnits_convert, METH_VARARGS|METH_KEYWORDS,
         RpUnits_convert_doc},
     
-	{NULL,		NULL}		/* sentinel */
+    {NULL,        NULL}        /* sentinel */
 };
 
@@ -525,31 +499,28 @@
 
 PyMODINIT_FUNC
-initRpUnits(void)
-{
-	PyObject *m;
-
-	/* Finalize the type object including setting type of the new type
-	 * object; doing it here is required for portability to Windows 
-	 * without requiring C++. */
-	if (PyType_Ready(&RpUnitsObjectType) < 0)
-		return;
-
-	/* Create the module and add the functions */
-	m = Py_InitModule3("RpUnits", RpUnits_Methods, module_doc);
-
-	/* Add some symbolic constants to the module */
-	if (ErrorObject == NULL) {
-		ErrorObject = PyErr_NewException("RpUnits.error", NULL, NULL);
-		if (ErrorObject == NULL)
-			return;
-	}
-	Py_INCREF(ErrorObject);
-	PyModule_AddObject(m, "error", ErrorObject);
-
+initUnits(void)
+{
+    PyObject *m;
+
+    /* Finalize the type object including setting type of the new type
+     * object; doing it here is required for portability to Windows 
+     * without requiring C++. */
+    if (PyType_Ready(&RpUnitsObjectType) < 0)
+        return;
+
+    /* Create the module and add the functions */
+    m = Py_InitModule3("Units", RpUnits_Methods, module_doc);
+
+    /* Add some symbolic constants to the module */
+    if (ErrorObject == NULL) {
+        ErrorObject = PyErr_NewException("RpUnits.error", NULL, NULL);
+        if (ErrorObject == NULL)
+            return;
+    }
+    Py_INCREF(ErrorObject);
+    PyModule_AddObject(m, "error", ErrorObject);
 
     // add some standard units definitions and conversions.
 
     RpUnits::addPresets("all");
-
-
-}
+}
