BIND 10 trac1575, updated. 81e5f0caa91e4be3b3e97d97ea6f56d92333bc16 [1575] wording fix to be consistent with the revised C++ doxygen description.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Jan 27 18:50:34 UTC 2012


The branch, trac1575 has been updated
       via  81e5f0caa91e4be3b3e97d97ea6f56d92333bc16 (commit)
       via  8d8a836667898774e1472eb94ea83175fbd76e52 (commit)
       via  f9f0ce117a1905e633489bf476bd22c673aff323 (commit)
       via  5b11239e580e3a283e0f120da4119f9dd7604257 (commit)
       via  0d483e15ebb9339797ba6a29dc96edb8cba2ec07 (commit)
       via  da9546a3569e096c68bdc9c5dda7c317cd0a77bf (commit)
      from  b8c42f3562a1d73a425118c1e3fcab3589c44228 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 81e5f0caa91e4be3b3e97d97ea6f56d92333bc16
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Jan 27 10:31:44 2012 -0800

    [1575] wording fix to be consistent with the revised C++ doxygen description.

commit 8d8a836667898774e1472eb94ea83175fbd76e52
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Jan 27 10:22:03 2012 -0800

    [1575] an additional comment

commit f9f0ce117a1905e633489bf476bd22c673aff323
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Jan 27 10:18:11 2012 -0800

    [1575] removed a remark comment from template

commit 5b11239e580e3a283e0f120da4119f9dd7604257
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Jan 27 10:10:48 2012 -0800

    [1575] revised error message for type mismatch to be more compat with std libs.

commit 0d483e15ebb9339797ba6a29dc96edb8cba2ec07
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Jan 27 10:00:00 2012 -0800

    [1575] wording fixes for the description of NSEC3Hash.calculate()

commit da9546a3569e096c68bdc9c5dda7c317cd0a77bf
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Jan 27 09:51:20 2012 -0800

    [1575] added '\brief' to doxygen items for clarity

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dns/nsec3hash.h                    |   18 +++++++++---------
 src/lib/dns/python/nsec3hash_python.cc     |   15 +++++++--------
 src/lib/dns/python/nsec3hash_python_inc.cc |    4 ++--
 3 files changed, 18 insertions(+), 19 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/nsec3hash.h b/src/lib/dns/nsec3hash.h
index 37979db..eba508a 100644
--- a/src/lib/dns/nsec3hash.h
+++ b/src/lib/dns/nsec3hash.h
@@ -31,8 +31,8 @@ class NSEC3PARAM;
 }
 }
 
-/// An exception that is thrown for when an \c NSEC3Hash object is constructed
-/// with an unknown hash algorithm.
+/// \brief An exception that is thrown for when an \c NSEC3Hash object is
+/// constructed with an unknown hash algorithm.
 ///
 /// A specific exception class is used so that the caller can selectively
 /// catch this exception, e.g., while loading a zone, and handle it
@@ -44,7 +44,7 @@ public:
         isc::Exception(file, line, what) {}
 };
 
-/// A calculator of NSEC3 hashes.
+/// \brief A calculator of NSEC3 hashes.
 ///
 /// This is a simple class that encapsulates the algorithm of calculating
 /// NSEC3 hash values as defined in RFC5155.
@@ -82,7 +82,7 @@ public:
 ///   the internal resources for different sets of parameters.
 class NSEC3Hash : public boost::noncopyable {
 public:
-    /// Constructor from NSEC3PARAM RDATA.
+    /// \brief Constructor from NSEC3PARAM RDATA.
     ///
     /// The hash algorithm given via \c param must be known to the
     /// implementation.  Otherwise \c UnknownNSEC3HashAlgorithm exception
@@ -95,16 +95,16 @@ public:
     /// \param param NSEC3 parameters used for subsequent calculation.
     NSEC3Hash(const rdata::generic::NSEC3PARAM& param);
 
-    /// The destructor.
+    /// \brief The destructor.
     ~NSEC3Hash();
 
-    /// Calculate the NSEC3 hash.
+    /// \brief Calculate the NSEC3 hash.
     ///
     /// This method calculates the NSEC3 hash value for the given \c name
     /// with the hash parameters (algorithm, iterations and salt) given at
-    /// construction, and returns the value in a base32hex-encoded string
-    /// (without containing any white spaces).  All alphabets in the string
-    /// will be upper cased.
+    /// construction, and returns the value as a base32hex-encoded string
+    /// (without containing any white spaces).  All US-ASCII letters in the
+    /// string will be upper cased.
     ///
     /// \param name The domain name for which the hash value is to be
     /// calculated.
diff --git a/src/lib/dns/python/nsec3hash_python.cc b/src/lib/dns/python/nsec3hash_python.cc
index f338700..52ce08f 100644
--- a/src/lib/dns/python/nsec3hash_python.cc
+++ b/src/lib/dns/python/nsec3hash_python.cc
@@ -47,9 +47,6 @@ s_NSEC3Hash::s_NSEC3Hash() : cppobj(NULL) {
 }
 
 namespace {
-// This is a template of typical code logic of python class initialization
-// with C++ backend.  You'll need to adjust it according to details of the
-// actual C++ class.
 int
 NSEC3Hash_init(PyObject* po_self, PyObject* args, PyObject*) {
     s_NSEC3Hash* const self = static_cast<s_NSEC3Hash*>(po_self);
@@ -57,8 +54,9 @@ NSEC3Hash_init(PyObject* po_self, PyObject* args, PyObject*) {
         PyObject* po_rdata;
         if (PyArg_ParseTuple(args, "O", &po_rdata)) {
             if (!PyRdata_Check(po_rdata)) {
-                PyErr_SetString(PyExc_TypeError,
-                                "function must be given NSEC3HASH Rdata");
+                PyErr_Format(PyExc_TypeError,
+                             "param must be an Rdata of type NSEC3HASH, "
+                             "not %.200s", po_rdata->ob_type->tp_name);
                 return (-1);
             }
             self->cppobj = new NSEC3Hash(
@@ -98,8 +96,9 @@ NSEC3Hash_calculate(PyObject* po_self, PyObject* args) {
         PyObject* po_name;
         if (PyArg_ParseTuple(args, "O", &po_name)) {
             if (!PyName_Check(po_name)) {
-                PyErr_SetString(PyExc_TypeError,
-                                "function must be given Name object");
+                PyErr_Format(PyExc_TypeError,
+                             "name must be a Name, not %.200s",
+                             po_name->ob_type->tp_name);
                 return (NULL);
             }
             const string hash =
@@ -193,7 +192,7 @@ PyTypeObject nsec3hash_type = {
     0                                   // tp_version_tag
 };
 
-// Module Initialization, all statics are initialized here
+// Module Initialization, all statics (nothing right now) are initialized here
 bool
 initModulePart_NSEC3Hash(PyObject* mod) {
     // We initialize the static description object with PyType_Ready(),
diff --git a/src/lib/dns/python/nsec3hash_python_inc.cc b/src/lib/dns/python/nsec3hash_python_inc.cc
index 9ce28c3..9e8640f 100644
--- a/src/lib/dns/python/nsec3hash_python_inc.cc
+++ b/src/lib/dns/python/nsec3hash_python_inc.cc
@@ -33,8 +33,8 @@ Calculate the NSEC3 hash.\n\
 This method calculates the NSEC3 hash value for the given name with\n\
 the hash parameters (algorithm, iterations and salt) given at\n\
 construction, and returns the value in a base32hex-encoded string\n\
-(without containing any white spaces). All alphabets in the string\n\
-will be upper cased.\n\
+(without containing any white spaces). All US-ASCII letters in the\n\
+string will be upper cased.\n\
 \n\
 Parameters:\n\
   name       The domain name for which the hash value is to be\n\




More information about the bind10-changes mailing list