Parcourir la source

[trac905] clarified in comments which calls to PyArg_ParseTuple()
in TSIGError_init correspond to which C++ constructors.

JINMEI Tatuya il y a 14 ans
Parent
commit
4472e3c7cb
2 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 2 2
      doc/Doxyfile
  2. 2 0
      src/lib/dns/python/tsigerror_python.cc

+ 2 - 2
doc/Doxyfile

@@ -1139,7 +1139,7 @@ MAN_LINKS              = NO
 # generate an XML file that captures the structure of
 # generate an XML file that captures the structure of
 # the code including all documentation.
 # the code including all documentation.
 
 
-GENERATE_XML           = NO
+GENERATE_XML           = YES
 
 
 # The XML_OUTPUT tag is used to specify where the XML pages will be put.
 # The XML_OUTPUT tag is used to specify where the XML pages will be put.
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -1164,7 +1164,7 @@ XML_DTD                =
 # and cross-referencing information) to the XML output. Note that
 # and cross-referencing information) to the XML output. Note that
 # enabling this will significantly increase the size of the XML output.
 # enabling this will significantly increase the size of the XML output.
 
 
-XML_PROGRAMLISTING     = YES
+XML_PROGRAMLISTING     = NO
 
 
 #---------------------------------------------------------------------------
 #---------------------------------------------------------------------------
 # configuration options for the AutoGen Definitions output
 # configuration options for the AutoGen Definitions output

+ 2 - 0
src/lib/dns/python/tsigerror_python.cc

@@ -92,6 +92,7 @@ PyMethodDef TSIGError_methods[] = {
 int
 int
 TSIGError_init(s_TSIGError* self, PyObject* args) {
 TSIGError_init(s_TSIGError* self, PyObject* args) {
     try {
     try {
+        // Constructor from the code value
         long code = 0;
         long code = 0;
         if (PyArg_ParseTuple(args, "l", &code)) {
         if (PyArg_ParseTuple(args, "l", &code)) {
             if (code < 0 || code > 0xffff) {
             if (code < 0 || code > 0xffff) {
@@ -102,6 +103,7 @@ TSIGError_init(s_TSIGError* self, PyObject* args) {
             return (0);
             return (0);
         }
         }
 
 
+        // Constructor from Rcode
         s_Rcode* py_rcode;
         s_Rcode* py_rcode;
         if (PyArg_ParseTuple(args, "O!", &rcode_type, &py_rcode)) {
         if (PyArg_ParseTuple(args, "O!", &rcode_type, &py_rcode)) {
             self->cppobj = new TSIGError(*py_rcode->cppobj);
             self->cppobj = new TSIGError(*py_rcode->cppobj);