BIND 10 trac1258, updated. aba10a01b765b472d57112fd4e09a6fb47b49fa7 [1258] pass unsigned int* to PyArg_ParseTuple instead of ParseOptions*. that would be a bit type safer.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Sep 30 04:32:34 UTC 2011


The branch, trac1258 has been updated
       via  aba10a01b765b472d57112fd4e09a6fb47b49fa7 (commit)
      from  9688dee697e9ad279c6542bf164b820e907e526f (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 aba10a01b765b472d57112fd4e09a6fb47b49fa7
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Sep 29 21:31:03 2011 -0700

    [1258] pass unsigned int* to PyArg_ParseTuple instead of ParseOptions*.
    that would be a bit type safer.

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

Summary of changes:
 src/lib/dns/python/message_python.cc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/python/message_python.cc b/src/lib/dns/python/message_python.cc
index 2c3d836..8f99835 100644
--- a/src/lib/dns/python/message_python.cc
+++ b/src/lib/dns/python/message_python.cc
@@ -646,7 +646,7 @@ Message_fromWire(PyObject* const pyself, PyObject* args) {
     s_Message* self = static_cast<s_Message*>(pyself);
     const char* b;
     Py_ssize_t len;
-    Message::ParseOptions options = Message::PARSE_DEFAULT;
+    unsigned int options = Message::PARSE_DEFAULT;
     if (PyArg_ParseTuple(args, "y#", &b, &len) ||
         PyArg_ParseTuple(args, "y#I", &b, &len, &options)) {
         // We need to clear the error in case the first call to ParseTuple
@@ -655,7 +655,8 @@ Message_fromWire(PyObject* const pyself, PyObject* args) {
 
         InputBuffer inbuf(b, len);
         try {
-            self->cppobj->fromWire(inbuf, options);
+            self->cppobj->fromWire(
+                inbuf, static_cast<Message::ParseOptions>(options));
             Py_RETURN_NONE;
         } catch (const InvalidMessageOperation& imo) {
             PyErr_SetString(po_InvalidMessageOperation, imo.what());




More information about the bind10-changes mailing list