Browse Source

[1245] cleanup of some comments in .cc files

A lot of the comments were leftovers from when this was all one big source file, and in individual files the comments were either wrong or superfluous (since the that was commented is self-explanatory with the context now)
Jelte Jansen 13 years ago
parent
commit
4d39f72b87

+ 0 - 18
src/lib/dns/python/edns_python.cc

@@ -34,23 +34,7 @@ using namespace isc::util;
 using namespace isc::dns::rdata;
 using namespace isc::dns::python;
 
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
 namespace {
-//
-// EDNS
-//
-
-//
-// 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 EDNS_init(s_EDNS* self, PyObject* args);
@@ -306,7 +290,6 @@ EDNS_createFromRR(const s_EDNS* null_self, PyObject* args) {
 }
 
 } // end of anonymous namespace
-// end of EDNS
 
 namespace isc {
 namespace dns {
@@ -366,7 +349,6 @@ PyTypeObject edns_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
 bool
 initModulePart_EDNS(PyObject* mod) {
     // We initialize the static description object with PyType_Ready(),

+ 0 - 18
src/lib/dns/python/message_python.cc

@@ -40,24 +40,6 @@ using namespace isc::util;
 
 namespace {
 
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
-//
-// Message
-//
-
-//
-// 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 Message_init(s_Message* self, PyObject* args);
 void Message_destroy(s_Message* self);
 

+ 2 - 25
src/lib/dns/python/messagerenderer_python.cc

@@ -25,13 +25,6 @@ using namespace isc::dns;
 using namespace isc::dns::python;
 using namespace isc::util;
 
-// MessageRenderer
-
-s_MessageRenderer::s_MessageRenderer() : outputbuffer(NULL),
-                                         messagerenderer(NULL)
-{
-}
-
 namespace {
 int MessageRenderer_init(s_MessageRenderer* self);
 void MessageRenderer_destroy(s_MessageRenderer* self);
@@ -174,7 +167,6 @@ MessageRenderer_clear(s_MessageRenderer* self) {
 }
 } // end of unnamed namespace
 
-// end of MessageRenderer
 namespace isc {
 namespace dns {
 namespace python {
@@ -233,27 +225,12 @@ PyTypeObject messagerenderer_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
-bool
-initModulePart_MessageRenderer(PyObject* mod) {
-    // Add the exceptions to the module
-
-    // Add the enums to the module
-
-    // Add the constants to the module
-
-    // Add the classes to the module
-    // We initialize the static description object with PyType_Ready(),
-    // then add it to the module
-
-    // NameComparisonResult
+bool initModulePart_MessageRenderer(PyObject* mod) {
     if (PyType_Ready(&messagerenderer_type) < 0) {
         return (false);
     }
     Py_INCREF(&messagerenderer_type);
 
-    // Class variables
-    // These are added to the tp_dict of the type object
     addClassVariable(messagerenderer_type, "CASE_INSENSITIVE",
                      Py_BuildValue("I", MessageRenderer::CASE_INSENSITIVE));
     addClassVariable(messagerenderer_type, "CASE_SENSITIVE",
@@ -261,7 +238,7 @@ initModulePart_MessageRenderer(PyObject* mod) {
 
     PyModule_AddObject(mod, "MessageRenderer",
                        reinterpret_cast<PyObject*>(&messagerenderer_type));
-    
+
     return (true);
 }
 } // namespace python

+ 1 - 12
src/lib/dns/python/name_python.cc

@@ -25,20 +25,12 @@
 #include "messagerenderer_python.h"
 #include "name_python.h"
 
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
 using namespace isc::dns;
 using namespace isc::dns::python;
 using namespace isc::util;
 using namespace isc::util::python;
 
 namespace {
-// NameComparisonResult
 
 int NameComparisonResult_init(s_NameComparisonResult*, PyObject*);
 void NameComparisonResult_destroy(s_NameComparisonResult* self);
@@ -84,9 +76,7 @@ PyObject*
 NameComparisonResult_getRelation(s_NameComparisonResult* self) {
     return (Py_BuildValue("I", self->cppobj->getRelation()));
 }
-// end of NameComparisonResult
 
-// Name
 // Shortcut type which would be convenient for adding class variables safely.
 typedef CPPPyObjectContainer<s_Name, Name> NameContainer;
 
@@ -495,7 +485,7 @@ Name_isWildCard(s_Name* self) {
         Py_RETURN_FALSE;
     }
 }
-// end of Name
+
 } // end of unnamed namespace
 
 namespace isc {
@@ -634,7 +624,6 @@ PyTypeObject name_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
 bool
 initModulePart_Name(PyObject* mod) {
     // Add the classes to the module

+ 0 - 15
src/lib/dns/python/opcode_python.cc

@@ -24,21 +24,7 @@ using namespace isc::dns;
 using namespace isc::dns::python;
 using namespace isc::util;
 
-//
-// Declaration of the custom exceptions (None for this class)
-
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
 namespace {
-//
-// Opcode
-//
 
 int Opcode_init(s_Opcode* const self, PyObject* args);
 void Opcode_destroy(s_Opcode* const self);
@@ -344,7 +330,6 @@ PyTypeObject opcode_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
 bool
 initModulePart_Opcode(PyObject* mod) {
     // We initialize the static description object with PyType_Ready(),

+ 0 - 14
src/lib/dns/python/question_python.cc

@@ -30,17 +30,8 @@ using namespace isc::dns::python;
 using namespace isc::util;
 using namespace isc;
 
-//
-// Question
-//
 namespace {
 
-//
-// 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
 static int Question_init(s_Question* self, PyObject* args);
 static void Question_destroy(s_Question* self);
 
@@ -221,8 +212,6 @@ Question_toWire(s_Question* self, PyObject* args) {
     return (NULL);
 }
 
-// end of Question
-
 } // end of unnamed namespace
 
 namespace isc {
@@ -283,9 +272,6 @@ PyTypeObject question_type = {
     0                                   // tp_version_tag
 };
 
-
-
-// Module Initialization, all statics are initialized here
 bool
 initModulePart_Question(PyObject* mod) {
     // Add the exceptions to the module

+ 2 - 17
src/lib/dns/python/rcode_python.cc

@@ -24,21 +24,6 @@
 using namespace isc::dns;
 using namespace isc::dns::python;
 
-//
-// Declaration of the custom exceptions (None for this class)
-
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
-//
-// Rcode
-//
-
 // Trivial constructor.
 s_Rcode::s_Rcode() : cppobj(NULL), static_code(false) {}
 
@@ -282,7 +267,7 @@ Rcode_BADVERS(const s_Rcode*) {
     return (Rcode_createStatic(Rcode::BADVERS()));
 }
 
-PyObject* 
+PyObject*
 Rcode_richcmp(const s_Rcode* const self, const s_Rcode* const other,
               const int op)
 {
@@ -376,7 +361,6 @@ PyTypeObject rcode_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
 bool
 initModulePart_Rcode(PyObject* mod) {
     // We initialize the static description object with PyType_Ready(),
@@ -429,6 +413,7 @@ initModulePart_Rcode(PyObject* mod) {
 
     return (true);
 }
+
 } // namespace python
 } // namespace dns
 } // namespace isc

+ 0 - 13
src/lib/dns/python/rdata_python.cc

@@ -28,18 +28,6 @@ using namespace isc::dns::python;
 using namespace isc::util;
 using namespace isc::dns::rdata;
 
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
-//
-// Rdata
-//
-
 namespace {
 
 //
@@ -196,7 +184,6 @@ RData_richcmp(s_Rdata* self, s_Rdata* other, int op) {
     else
         Py_RETURN_FALSE;
 }
-// end of Rdata
 
 } // end of unnamed namespace
 

+ 0 - 13
src/lib/dns/python/rrclass_python.cc

@@ -27,18 +27,6 @@ using namespace isc::dns;
 using namespace isc::dns::python;
 using namespace isc::util;
 using namespace isc::util::python;
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
-//
-// RRClass
-//
-
 namespace {
 
 //
@@ -269,7 +257,6 @@ static PyObject* RRClass_NONE(s_RRClass*) {
 static PyObject* RRClass_ANY(s_RRClass*) {
     return (RRClass_createStatic(RRClass::ANY()));
 }
-// end of RRClass
 
 } // end anonymous namespace
 

+ 1 - 14
src/lib/dns/python/rrset_python.cc

@@ -29,21 +29,12 @@
 #include "rdata_python.h"
 #include "messagerenderer_python.h"
 
-namespace {
-
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
 using namespace isc::dns;
 using namespace isc::dns::python;
 using namespace isc::util;
 using namespace isc::util::python;
 
-// RRset
+namespace {
 
 // Shortcut type which would be convenient for adding class variables safely.
 typedef CPPPyObjectContainer<s_RRset, RRset> RRsetContainer;
@@ -321,10 +312,6 @@ RRset_removeRRsig(s_RRset* self) {
     Py_RETURN_NONE;
 }
 
-
-// end of RRset
-
-
 } // end of unnamed namespace
 
 namespace isc {

+ 1 - 20
src/lib/dns/python/rrttl_python.cc

@@ -29,28 +29,10 @@ using namespace isc::dns::python;
 using namespace isc::util;
 
 namespace {
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
-
-//
-// RRTTL
-//
 
-//
-// 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
 static int RRTTL_init(s_RRTTL* self, PyObject* args);
 static void RRTTL_destroy(s_RRTTL* self);
 
-// These are the functions we export
 static PyObject* RRTTL_toText(s_RRTTL* self);
 // This is a second version of toText, we need one where the argument
 // is a PyObject*, for the str() function in python.
@@ -229,9 +211,8 @@ RRTTL_richcmp(s_RRTTL* self, s_RRTTL* other, int op) {
     else
         Py_RETURN_FALSE;
 }
-// end of RRTTL
-} // end anonymous namespace
 
+} // end anonymous namespace
 
 namespace isc {
 namespace dns {

+ 0 - 18
src/lib/dns/python/rrtype_python.cc

@@ -29,25 +29,8 @@ using namespace isc::dns::python;
 using namespace isc::util;
 using namespace isc::util::python;
 
-
-//
-// Definition of the classes
-//
-
-// For each class, we need a struct, a helper functions (init, destroy,
-// and static wrappers around the methods we export), a list of methods,
-// and a type description
 namespace {
 
-//
-// RRType
-//
-
-//
-// 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
 static int RRType_init(s_RRType* self, PyObject* args);
 static void RRType_destroy(s_RRType* self);
@@ -445,7 +428,6 @@ PyTypeObject rrtype_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
 bool
 initModulePart_RRType(PyObject* mod) {
     // Add the exceptions to the module