Browse Source

[1179] style fixes

Jelte Jansen 13 years ago
parent
commit
0fa8006ade

+ 31 - 29
src/lib/python/isc/datasrc/client_python.cc

@@ -44,6 +44,7 @@
 
 using namespace std;
 using namespace isc::util::python;
+using namespace isc::dns::python;
 using namespace isc::datasrc;
 using namespace isc::datasrc::python;
 
@@ -59,25 +60,16 @@ public:
 typedef CPPPyObjectContainer<s_DataSourceClient, DataSourceClient>
     DataSourceClientContainer;
 
-//
-// We declare the functions here, the definitions are below
-// the type definition of the object, since both can use the other
-//
-
-// General creation and destruction
-int DataSourceClient_init(s_DataSourceClient* self, PyObject* args);
-void DataSourceClient_destroy(s_DataSourceClient* self);
-
 // These are the functions we export
 //
 PyObject*
 DataSourceClient_findZone(PyObject* po_self, PyObject* args) {
     s_DataSourceClient* const self = static_cast<s_DataSourceClient*>(po_self);
     PyObject *name;
-    if (PyArg_ParseTuple(args, "O!", &isc::dns::python::name_type, &name)) {
+    if (PyArg_ParseTuple(args, "O!", &name_type, &name)) {
         try {
             DataSourceClient::FindResult find_result(
-                self->cppobj->findZone(isc::dns::python::PyName_ToName(name)));
+                self->cppobj->findZone(PyName_ToName(name)));
 
             result::Result r = find_result.code;
             ZoneFinderPtr zfp = find_result.zone_finder;
@@ -87,7 +79,8 @@ DataSourceClient_findZone(PyObject* po_self, PyObject* args) {
             PyErr_SetString(getDataSourceException("Error"), exc.what());
             return (NULL);
         } catch (...) {
-            PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+            PyErr_SetString(getDataSourceException("Error"),
+                            "Unexpected exception");
             return (NULL);
         }
     } else {
@@ -99,11 +92,13 @@ PyObject*
 DataSourceClient_getIterator(PyObject* po_self, PyObject* args) {
     s_DataSourceClient* const self = static_cast<s_DataSourceClient*>(po_self);
     PyObject *name_obj;
-    if (PyArg_ParseTuple(args, "O!", &isc::dns::python::name_type, &name_obj)) {
+    if (PyArg_ParseTuple(args, "O!", &name_type, &name_obj)) {
         try {
-            return (createZoneIteratorObject(self->cppobj->getIterator(isc::dns::python::PyName_ToName(name_obj))));
+            return (createZoneIteratorObject(
+                        self->cppobj->getIterator(PyName_ToName(name_obj))));
         } catch (const isc::NotImplemented& ne) {
-            PyErr_SetString(getDataSourceException("NotImplemented"), ne.what());
+            PyErr_SetString(getDataSourceException("NotImplemented"),
+                            ne.what());
             return (NULL);
         } catch (const DataSourceError& dse) {
             PyErr_SetString(getDataSourceException("Error"), dse.what());
@@ -112,7 +107,8 @@ DataSourceClient_getIterator(PyObject* po_self, PyObject* args) {
             PyErr_SetString(getDataSourceException("Error"), exc.what());
             return (NULL);
         } catch (...) {
-            PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+            PyErr_SetString(getDataSourceException("Error"),
+                            "Unexpected exception");
             return (NULL);
         }
     } else {
@@ -125,12 +121,16 @@ DataSourceClient_getUpdater(PyObject* po_self, PyObject* args) {
     s_DataSourceClient* const self = static_cast<s_DataSourceClient*>(po_self);
     PyObject *name_obj;
     PyObject *replace_obj;
-    if (PyArg_ParseTuple(args, "O!O", &isc::dns::python::name_type, &name_obj, &replace_obj) && PyBool_Check(replace_obj)) {
+    if (PyArg_ParseTuple(args, "O!O", &name_type, &name_obj, &replace_obj) &&
+        PyBool_Check(replace_obj)) {
         bool replace = (replace_obj != Py_False);
         try {
-            return (createZoneUpdaterObject(self->cppobj->getUpdater(isc::dns::python::PyName_ToName(name_obj), replace)));
+            return (createZoneUpdaterObject(
+                        self->cppobj->getUpdater(PyName_ToName(name_obj),
+                                                 replace)));
         } catch (const isc::NotImplemented& ne) {
-            PyErr_SetString(getDataSourceException("NotImplemented"), ne.what());
+            PyErr_SetString(getDataSourceException("NotImplemented"),
+                            ne.what());
             return (NULL);
         } catch (const DataSourceError& dse) {
             PyErr_SetString(getDataSourceException("Error"), dse.what());
@@ -139,7 +139,8 @@ DataSourceClient_getUpdater(PyObject* po_self, PyObject* args) {
             PyErr_SetString(getDataSourceException("Error"), exc.what());
             return (NULL);
         } catch (...) {
-            PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+            PyErr_SetString(getDataSourceException("Error"),
+                            "Unexpected exception");
             return (NULL);
         }
     } else {
@@ -156,12 +157,13 @@ DataSourceClient_getUpdater(PyObject* po_self, PyObject* args) {
 // 3. Argument type
 // 4. Documentation
 PyMethodDef DataSourceClient_methods[] = {
-    { "find_zone", reinterpret_cast<PyCFunction>(DataSourceClient_findZone), METH_VARARGS,
-      DataSourceClient_findZone_doc },
-    { "get_iterator", reinterpret_cast<PyCFunction>(DataSourceClient_getIterator), METH_VARARGS,
+    { "find_zone", reinterpret_cast<PyCFunction>(DataSourceClient_findZone),
+      METH_VARARGS, DataSourceClient_findZone_doc },
+    { "get_iterator",
+      reinterpret_cast<PyCFunction>(DataSourceClient_getIterator), METH_VARARGS,
       DataSourceClient_getIterator_doc },
-    { "get_updater", reinterpret_cast<PyCFunction>(DataSourceClient_getUpdater), METH_VARARGS,
-      DataSourceClient_getUpdater_doc },
+    { "get_updater", reinterpret_cast<PyCFunction>(DataSourceClient_getUpdater),
+      METH_VARARGS, DataSourceClient_getUpdater_doc },
     { NULL, NULL, 0, NULL }
 };
 
@@ -222,9 +224,9 @@ namespace python {
 PyTypeObject datasourceclient_type = {
     PyVarObject_HEAD_INIT(NULL, 0)
     "datasrc.DataSourceClient",
-    sizeof(s_DataSourceClient),                 // tp_basicsize
+    sizeof(s_DataSourceClient),         // tp_basicsize
     0,                                  // tp_itemsize
-    reinterpret_cast<destructor>(DataSourceClient_destroy),       // tp_dealloc
+    reinterpret_cast<destructor>(DataSourceClient_destroy),// tp_dealloc
     NULL,                               // tp_print
     NULL,                               // tp_getattr
     NULL,                               // tp_setattr
@@ -247,7 +249,7 @@ PyTypeObject datasourceclient_type = {
     0,                                  // tp_weaklistoffset
     NULL,                               // tp_iter
     NULL,                               // tp_iternext
-    DataSourceClient_methods,                   // tp_methods
+    DataSourceClient_methods,           // tp_methods
     NULL,                               // tp_members
     NULL,                               // tp_getset
     NULL,                               // tp_base
@@ -255,7 +257,7 @@ PyTypeObject datasourceclient_type = {
     NULL,                               // tp_descr_get
     NULL,                               // tp_descr_set
     0,                                  // tp_dictoffset
-    reinterpret_cast<initproc>(DataSourceClient_init),            // tp_init
+    reinterpret_cast<initproc>(DataSourceClient_init),// tp_init
     NULL,                               // tp_alloc
     PyType_GenericNew,                  // tp_new
     NULL,                               // tp_free

+ 27 - 25
src/lib/python/isc/datasrc/finder_python.cc

@@ -44,6 +44,7 @@
 
 using namespace std;
 using namespace isc::util::python;
+using namespace isc::dns::python;
 using namespace isc::datasrc;
 using namespace isc::datasrc::python;
 
@@ -58,11 +59,6 @@ public:
 // Shortcut type which would be convenient for adding class variables safely.
 typedef CPPPyObjectContainer<s_ZoneFinder, ZoneFinder> ZoneFinderContainer;
 
-//
-// We declare the functions here, the definitions are below
-// the type definition of the object, since both can use the other
-//
-
 // General creation and destruction
 int
 ZoneFinder_init(s_ZoneFinder* self, PyObject* args) {
@@ -83,43 +79,48 @@ ZoneFinder_destroy(s_ZoneFinder* const self) {
 
 // These are the functions we export
 //
-PyObject* ZoneFinder_getClass(PyObject* po_self, PyObject*) {
+PyObject*
+ZoneFinder_getClass(PyObject* po_self, PyObject*) {
     s_ZoneFinder* self = static_cast<s_ZoneFinder*>(po_self);
     try {
-        return (isc::dns::python::createRRClassObject(self->cppobj->getClass()));
+        return (createRRClassObject(self->cppobj->getClass()));
     } catch (const std::exception& exc) {
         PyErr_SetString(getDataSourceException("Error"), exc.what());
         return (NULL);
     }
 }
 
-PyObject* ZoneFinder_getOrigin(PyObject* po_self, PyObject*) {
+PyObject*
+ZoneFinder_getOrigin(PyObject* po_self, PyObject*) {
     s_ZoneFinder* self = static_cast<s_ZoneFinder*>(po_self);
     try {
-        return (isc::dns::python::createNameObject(self->cppobj->getOrigin()));
+        return (createNameObject(self->cppobj->getOrigin()));
     } catch (const std::exception& exc) {
         PyErr_SetString(getDataSourceException("Error"), exc.what());
         return (NULL);
     } catch (...) {
-        PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+        PyErr_SetString(getDataSourceException("Error"),
+                        "Unexpected exception");
         return (NULL);
     }
 }
 
-PyObject* ZoneFinder_find(PyObject* po_self, PyObject* args) {
+PyObject*
+ZoneFinder_find(PyObject* po_self, PyObject* args) {
     s_ZoneFinder* const self = static_cast<s_ZoneFinder*>(po_self);
     PyObject *name;
     PyObject *rrtype;
     PyObject *target;
     int options_int;
-    if (PyArg_ParseTuple(args, "O!O!OI", &isc::dns::python::name_type, &name,
-                                         &isc::dns::python::rrtype_type, &rrtype,
+    if (PyArg_ParseTuple(args, "O!O!OI", &name_type, &name,
+                                         &rrtype_type, &rrtype,
                                          &target, &options_int)) {
         try {
-            ZoneFinder::FindOptions options = static_cast<ZoneFinder::FindOptions>(options_int);
+            ZoneFinder::FindOptions options =
+                static_cast<ZoneFinder::FindOptions>(options_int);
             ZoneFinder::FindResult find_result(
-                self->cppobj->find(isc::dns::python::PyName_ToName(name),
-                                   isc::dns::python::PyRRType_ToRRType(rrtype),
+                self->cppobj->find(PyName_ToName(name),
+                                   PyRRType_ToRRType(rrtype),
                                    NULL,
                                    options
                                    ));
@@ -127,7 +128,7 @@ PyObject* ZoneFinder_find(PyObject* po_self, PyObject* args) {
             isc::dns::ConstRRsetPtr rrsp = find_result.rrset;
             if (rrsp) {
                 // Use N instead of O so the refcount isn't increased twice
-                return (Py_BuildValue("IN", r, isc::dns::python::createRRsetObject(*rrsp)));
+                return (Py_BuildValue("IN", r, createRRsetObject(*rrsp)));
             } else {
                 return (Py_BuildValue("IO", r, Py_None));
             }
@@ -138,7 +139,8 @@ PyObject* ZoneFinder_find(PyObject* po_self, PyObject* args) {
             PyErr_SetString(getDataSourceException("Error"), exc.what());
             return (NULL);
         } catch (...) {
-            PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+            PyErr_SetString(getDataSourceException("Error"),
+                            "Unexpected exception");
             return (NULL);
         }
     } else {
@@ -154,10 +156,10 @@ PyObject* ZoneFinder_find(PyObject* po_self, PyObject* args) {
 // 3. Argument type
 // 4. Documentation
 PyMethodDef ZoneFinder_methods[] = {
-    { "get_origin", reinterpret_cast<PyCFunction>(ZoneFinder_getOrigin), METH_NOARGS,
-      ZoneFinder_getOrigin_doc },
-    { "get_class", reinterpret_cast<PyCFunction>(ZoneFinder_getClass), METH_NOARGS,
-      ZoneFinder_getClass_doc },
+    { "get_origin", reinterpret_cast<PyCFunction>(ZoneFinder_getOrigin),
+      METH_NOARGS, ZoneFinder_getOrigin_doc },
+    { "get_class", reinterpret_cast<PyCFunction>(ZoneFinder_getClass),
+      METH_NOARGS, ZoneFinder_getClass_doc },
     { "find", reinterpret_cast<PyCFunction>(ZoneFinder_find), METH_VARARGS,
       ZoneFinder_find_doc },
     { NULL, NULL, 0, NULL }
@@ -171,9 +173,9 @@ namespace python {
 PyTypeObject zonefinder_type = {
     PyVarObject_HEAD_INIT(NULL, 0)
     "datasrc.ZoneFinder",
-    sizeof(s_ZoneFinder),             // tp_basicsize
+    sizeof(s_ZoneFinder),               // tp_basicsize
     0,                                  // tp_itemsize
-    reinterpret_cast<destructor>(ZoneFinder_destroy),       // tp_dealloc
+    reinterpret_cast<destructor>(ZoneFinder_destroy),// tp_dealloc
     NULL,                               // tp_print
     NULL,                               // tp_getattr
     NULL,                               // tp_setattr
@@ -196,7 +198,7 @@ PyTypeObject zonefinder_type = {
     0,                                  // tp_weaklistoffset
     NULL,                               // tp_iter
     NULL,                               // tp_iternext
-    ZoneFinder_methods,               // tp_methods
+    ZoneFinder_methods,                 // tp_methods
     NULL,                               // tp_members
     NULL,                               // tp_getset
     NULL,                               // tp_base

+ 12 - 20
src/lib/python/isc/datasrc/iterator_python.cc

@@ -40,6 +40,7 @@
 
 using namespace std;
 using namespace isc::util::python;
+using namespace isc::dns::python;
 using namespace isc::datasrc;
 using namespace isc::datasrc::python;
 
@@ -52,8 +53,8 @@ public:
 };
 
 // Shortcut type which would be convenient for adding class variables safely.
-typedef CPPPyObjectContainer<s_ZoneIterator, ZoneIterator> ZoneIteratorContainer;
-
+typedef CPPPyObjectContainer<s_ZoneIterator, ZoneIterator>
+    ZoneIteratorContainer;
 
 // General creation and destruction
 int
@@ -79,14 +80,15 @@ ZoneIterator_destroy(s_ZoneIterator* const self) {
 // We declare the functions here, the definitions are below
 // the type definition of the object, since both can use the other
 //
-PyObject* ZoneIterator_getNextRRset(PyObject* po_self, PyObject*) {
+PyObject*
+ZoneIterator_getNextRRset(PyObject* po_self, PyObject*) {
     s_ZoneIterator* self = static_cast<s_ZoneIterator*>(po_self);
     try {
         isc::dns::ConstRRsetPtr rrset = self->cppobj->getNextRRset();
         if (!rrset) {
             Py_RETURN_NONE;
         }
-        return (isc::dns::python::createRRsetObject(*rrset));
+        return (createRRsetObject(*rrset));
     } catch (const isc::Exception& isce) {
         // isc::Unexpected is thrown when we call getNextRRset() when we are
         // already done iterating ('iterating past end')
@@ -97,26 +99,16 @@ PyObject* ZoneIterator_getNextRRset(PyObject* po_self, PyObject*) {
         PyErr_SetString(getDataSourceException("Error"), exc.what());
         return (NULL);
     } catch (...) {
-        PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+        PyErr_SetString(getDataSourceException("Error"),
+                        "Unexpected exception");
         return (NULL);
     }
 }
 
-// These are the functions we export
-//
-
-// These are the functions we export
-// For a minimal support, we don't need them.
-
-// This list contains the actual set of functions we have in
-// python. Each entry has
-// 1. Python method name
-// 2. Our static function here
-// 3. Argument type
-// 4. Documentation
 PyMethodDef ZoneIterator_methods[] = {
-    { "get_next_rrset", reinterpret_cast<PyCFunction>(ZoneIterator_getNextRRset),
-      METH_NOARGS, ZoneIterator_getNextRRset_doc },
+    { "get_next_rrset",
+      reinterpret_cast<PyCFunction>(ZoneIterator_getNextRRset), METH_NOARGS,
+      ZoneIterator_getNextRRset_doc },
     { NULL, NULL, 0, NULL }
 };
 
@@ -131,7 +123,7 @@ PyTypeObject zoneiterator_type = {
     "datasrc.ZoneIterator",
     sizeof(s_ZoneIterator),             // tp_basicsize
     0,                                  // tp_itemsize
-    reinterpret_cast<destructor>(ZoneIterator_destroy),       // tp_dealloc
+    reinterpret_cast<destructor>(ZoneIterator_destroy),// tp_dealloc
     NULL,                               // tp_print
     NULL,                               // tp_getattr
     NULL,                               // tp_setattr

+ 43 - 32
src/lib/python/isc/datasrc/updater_python.cc

@@ -44,6 +44,7 @@
 
 using namespace std;
 using namespace isc::util::python;
+using namespace isc::dns::python;
 using namespace isc::datasrc;
 using namespace isc::datasrc::python;
 
@@ -85,12 +86,13 @@ ZoneUpdater_destroy(s_ZoneUpdater* const self) {
 
 // These are the functions we export
 //
-PyObject* ZoneUpdater_addRRset(PyObject* po_self, PyObject* args) {
+PyObject*
+ZoneUpdater_addRRset(PyObject* po_self, PyObject* args) {
     s_ZoneUpdater* const self = static_cast<s_ZoneUpdater*>(po_self);
     PyObject* rrset_obj;
-    if (PyArg_ParseTuple(args, "O!", &isc::dns::python::rrset_type, &rrset_obj)) {
+    if (PyArg_ParseTuple(args, "O!", &rrset_type, &rrset_obj)) {
         try {
-            self->cppobj->addRRset(isc::dns::python::PyRRset_ToRRset(rrset_obj));
+            self->cppobj->addRRset(PyRRset_ToRRset(rrset_obj));
             Py_RETURN_NONE;
         } catch (const DataSourceError& dse) {
             PyErr_SetString(getDataSourceException("Error"), dse.what());
@@ -104,12 +106,13 @@ PyObject* ZoneUpdater_addRRset(PyObject* po_self, PyObject* args) {
     }
 }
 
-PyObject* ZoneUpdater_deleteRRset(PyObject* po_self, PyObject* args) {
+PyObject*
+ZoneUpdater_deleteRRset(PyObject* po_self, PyObject* args) {
     s_ZoneUpdater* const self = static_cast<s_ZoneUpdater*>(po_self);
     PyObject* rrset_obj;
-    if (PyArg_ParseTuple(args, "O!", &isc::dns::python::rrset_type, &rrset_obj)) {
+    if (PyArg_ParseTuple(args, "O!", &rrset_type, &rrset_obj)) {
         try {
-            self->cppobj->deleteRRset(isc::dns::python::PyRRset_ToRRset(rrset_obj));
+            self->cppobj->deleteRRset(PyRRset_ToRRset(rrset_obj));
             Py_RETURN_NONE;
         } catch (const DataSourceError& dse) {
             PyErr_SetString(getDataSourceException("Error"), dse.what());
@@ -123,7 +126,8 @@ PyObject* ZoneUpdater_deleteRRset(PyObject* po_self, PyObject* args) {
     }
 }
 
-PyObject* ZoneUpdater_commit(PyObject* po_self, PyObject*) {
+PyObject*
+ZoneUpdater_commit(PyObject* po_self, PyObject*) {
     s_ZoneUpdater* const self = static_cast<s_ZoneUpdater*>(po_self);
     try {
         self->cppobj->commit();
@@ -139,46 +143,52 @@ PyObject* ZoneUpdater_commit(PyObject* po_self, PyObject*) {
 
 // These are the functions we export
 //
-PyObject* ZoneUpdater_getClass(PyObject* po_self, PyObject*) {
+PyObject*
+ZoneUpdater_getClass(PyObject* po_self, PyObject*) {
     s_ZoneUpdater* self = static_cast<s_ZoneUpdater*>(po_self);
     try {
-        return (isc::dns::python::createRRClassObject(self->cppobj->getFinder().getClass()));
+        return (createRRClassObject(self->cppobj->getFinder().getClass()));
     } catch (const std::exception& exc) {
         PyErr_SetString(getDataSourceException("Error"), exc.what());
         return (NULL);
     } catch (...) {
-        PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+        PyErr_SetString(getDataSourceException("Error"),
+                        "Unexpected exception");
         return (NULL);
     }
 }
 
-PyObject* ZoneUpdater_getOrigin(PyObject* po_self, PyObject*) {
+PyObject*
+ZoneUpdater_getOrigin(PyObject* po_self, PyObject*) {
     s_ZoneUpdater* self = static_cast<s_ZoneUpdater*>(po_self);
     try {
-        return (isc::dns::python::createNameObject(self->cppobj->getFinder().getOrigin()));
+        return (createNameObject(self->cppobj->getFinder().getOrigin()));
     } catch (const std::exception& exc) {
         PyErr_SetString(getDataSourceException("Error"), exc.what());
         return (NULL);
     } catch (...) {
-        PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+        PyErr_SetString(getDataSourceException("Error"),
+                        "Unexpected exception");
         return (NULL);
     }
 }
 
-PyObject* ZoneUpdater_find(PyObject* po_self, PyObject* args) {
+PyObject*
+ZoneUpdater_find(PyObject* po_self, PyObject* args) {
     s_ZoneUpdater* const self = static_cast<s_ZoneUpdater*>(po_self);
     PyObject *name;
     PyObject *rrtype;
     PyObject *target;
     int options_int;
-    if (PyArg_ParseTuple(args, "O!O!OI", &isc::dns::python::name_type, &name,
-                                         &isc::dns::python::rrtype_type, &rrtype,
+    if (PyArg_ParseTuple(args, "O!O!OI", &name_type, &name,
+                                         &rrtype_type, &rrtype,
                                          &target, &options_int)) {
         try {
-            ZoneFinder::FindOptions options = static_cast<ZoneFinder::FindOptions>(options_int);
+            ZoneFinder::FindOptions options =
+                static_cast<ZoneFinder::FindOptions>(options_int);
             ZoneFinder::FindResult find_result(
-                self->cppobj->getFinder().find(isc::dns::python::PyName_ToName(name),
-                                   isc::dns::python::PyRRType_ToRRType(rrtype),
+                self->cppobj->getFinder().find(PyName_ToName(name),
+                                   PyRRType_ToRRType(rrtype),
                                    NULL,
                                    options
                                    ));
@@ -186,7 +196,7 @@ PyObject* ZoneUpdater_find(PyObject* po_self, PyObject* args) {
             isc::dns::ConstRRsetPtr rrsp = find_result.rrset;
             if (rrsp) {
                 // Use N instead of O so the refcount isn't increased twice
-                return Py_BuildValue("IN", r, isc::dns::python::createRRsetObject(*rrsp));
+                return Py_BuildValue("IN", r, createRRsetObject(*rrsp));
             } else {
                 return Py_BuildValue("IO", r, Py_None);
             }
@@ -197,7 +207,8 @@ PyObject* ZoneUpdater_find(PyObject* po_self, PyObject* args) {
             PyErr_SetString(getDataSourceException("Error"), exc.what());
             return (NULL);
         } catch (...) {
-            PyErr_SetString(getDataSourceException("Error"), "Unexpected exception");
+            PyErr_SetString(getDataSourceException("Error"),
+                            "Unexpected exception");
             return (NULL);
         }
     } else {
@@ -214,20 +225,20 @@ PyObject* ZoneUpdater_find(PyObject* po_self, PyObject* args) {
 // 3. Argument type
 // 4. Documentation
 PyMethodDef ZoneUpdater_methods[] = {
-    { "add_rrset", reinterpret_cast<PyCFunction>(ZoneUpdater_addRRset), METH_VARARGS,
-      ZoneUpdater_addRRset_doc },
-    { "delete_rrset", reinterpret_cast<PyCFunction>(ZoneUpdater_deleteRRset), METH_VARARGS,
-      ZoneUpdater_deleteRRset_doc },
+    { "add_rrset", reinterpret_cast<PyCFunction>(ZoneUpdater_addRRset),
+      METH_VARARGS, ZoneUpdater_addRRset_doc },
+    { "delete_rrset", reinterpret_cast<PyCFunction>(ZoneUpdater_deleteRRset),
+      METH_VARARGS, ZoneUpdater_deleteRRset_doc },
     { "commit", reinterpret_cast<PyCFunction>(ZoneUpdater_commit), METH_NOARGS,
       ZoneUpdater_commit_doc },
     // Instead of a getFinder, we implement the finder functionality directly
     // This is because ZoneFinder is non-copyable, and we should not create
     // a ZoneFinder object from a reference only (which is what is returned
     // by getFinder(). Apart from that
-    { "get_origin", reinterpret_cast<PyCFunction>(ZoneUpdater_getOrigin), METH_NOARGS,
-      ZoneFinder_getOrigin_doc },
-    { "get_class", reinterpret_cast<PyCFunction>(ZoneUpdater_getClass), METH_NOARGS,
-      ZoneFinder_getClass_doc },
+    { "get_origin", reinterpret_cast<PyCFunction>(ZoneUpdater_getOrigin),
+      METH_NOARGS, ZoneFinder_getOrigin_doc },
+    { "get_class", reinterpret_cast<PyCFunction>(ZoneUpdater_getClass),
+      METH_NOARGS, ZoneFinder_getClass_doc },
     { "find", reinterpret_cast<PyCFunction>(ZoneUpdater_find), METH_VARARGS,
       ZoneFinder_find_doc },
     { NULL, NULL, 0, NULL }
@@ -241,9 +252,9 @@ namespace python {
 PyTypeObject zoneupdater_type = {
     PyVarObject_HEAD_INIT(NULL, 0)
     "datasrc.ZoneUpdater",
-    sizeof(s_ZoneUpdater),             // tp_basicsize
+    sizeof(s_ZoneUpdater),              // tp_basicsize
     0,                                  // tp_itemsize
-    reinterpret_cast<destructor>(ZoneUpdater_destroy),       // tp_dealloc
+    reinterpret_cast<destructor>(ZoneUpdater_destroy),// tp_dealloc
     NULL,                               // tp_print
     NULL,                               // tp_getattr
     NULL,                               // tp_setattr
@@ -266,7 +277,7 @@ PyTypeObject zoneupdater_type = {
     0,                                  // tp_weaklistoffset
     NULL,                               // tp_iter
     NULL,                               // tp_iternext
-    ZoneUpdater_methods,               // tp_methods
+    ZoneUpdater_methods,                // tp_methods
     NULL,                               // tp_members
     NULL,                               // tp_getset
     NULL,                               // tp_base