[svn] commit: r3001 - in /trunk/src/lib/dns/python: message_python.cc name_python.cc question_python.cc rdata_python.cc rrclass_python.cc rrset_python.cc rrttl_python.cc rrtype_python.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Sep 22 06:28:24 UTC 2010
Author: jinmei
Date: Wed Sep 22 06:28:23 2010
New Revision: 3001
Log:
removed unnecessary cast from pydnspp binding to help NetBSD compile
the code with -O2 (trac #348)
Modified:
trunk/src/lib/dns/python/message_python.cc
trunk/src/lib/dns/python/name_python.cc
trunk/src/lib/dns/python/question_python.cc
trunk/src/lib/dns/python/rdata_python.cc
trunk/src/lib/dns/python/rrclass_python.cc
trunk/src/lib/dns/python/rrset_python.cc
trunk/src/lib/dns/python/rrttl_python.cc
trunk/src/lib/dns/python/rrtype_python.cc
Modified: trunk/src/lib/dns/python/message_python.cc
==============================================================================
--- trunk/src/lib/dns/python/message_python.cc (original)
+++ trunk/src/lib/dns/python/message_python.cc Wed Sep 22 06:28:23 2010
@@ -1535,7 +1535,7 @@
Message_toWire(s_Message* self, PyObject* args) {
s_MessageRenderer* mr;
- if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
try {
self->message->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
Modified: trunk/src/lib/dns/python/name_python.cc
==============================================================================
--- trunk/src/lib/dns/python/name_python.cc (original)
+++ trunk/src/lib/dns/python/name_python.cc Wed Sep 22 06:28:23 2010
@@ -421,7 +421,7 @@
// to prevent memory leak
Py_DECREF(name_bytes);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->name->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
@@ -437,7 +437,7 @@
Name_compare(s_Name* self, PyObject* args) {
s_Name* other;
- if (!PyArg_ParseTuple(args, "O!", &name_type, (PyObject* *) &other))
+ if (!PyArg_ParseTuple(args, "O!", &name_type, &other))
return (NULL);
s_NameComparisonResult* ret = PyObject_New(s_NameComparisonResult, &name_comparison_result_type);
@@ -452,7 +452,7 @@
Name_equals(s_Name* self, PyObject* args) {
s_Name* other;
- if (!PyArg_ParseTuple(args, "O!", &name_type, (PyObject* *) &other))
+ if (!PyArg_ParseTuple(args, "O!", &name_type, &other))
return (NULL);
if (self->name->equals(*other->name))
@@ -565,7 +565,7 @@
Name_concatenate(s_Name* self, PyObject* args) {
s_Name* other;
- if (!PyArg_ParseTuple(args, "O!", &name_type, (PyObject**) &other))
+ if (!PyArg_ParseTuple(args, "O!", &name_type, &other))
return (NULL);
s_Name* ret = PyObject_New(s_Name, &name_type);
Modified: trunk/src/lib/dns/python/question_python.cc
==============================================================================
--- trunk/src/lib/dns/python/question_python.cc (original)
+++ trunk/src/lib/dns/python/question_python.cc Wed Sep 22 06:28:23 2010
@@ -254,8 +254,7 @@
// to prevent memory leak
Py_DECREF(n);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type,
- reinterpret_cast<PyObject**>(&mr))) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->question->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
Modified: trunk/src/lib/dns/python/rdata_python.cc
==============================================================================
--- trunk/src/lib/dns/python/rdata_python.cc (original)
+++ trunk/src/lib/dns/python/rdata_python.cc Wed Sep 22 06:28:23 2010
@@ -195,7 +195,7 @@
// to prevent memory leak
Py_DECREF(rd_bytes);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->rdata->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
Modified: trunk/src/lib/dns/python/rrclass_python.cc
==============================================================================
--- trunk/src/lib/dns/python/rrclass_python.cc (original)
+++ trunk/src/lib/dns/python/rrclass_python.cc Wed Sep 22 06:28:23 2010
@@ -236,7 +236,7 @@
// to prevent memory leak
Py_DECREF(n);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->rrclass->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
Modified: trunk/src/lib/dns/python/rrset_python.cc
==============================================================================
--- trunk/src/lib/dns/python/rrset_python.cc (original)
+++ trunk/src/lib/dns/python/rrset_python.cc Wed Sep 22 06:28:23 2010
@@ -315,7 +315,7 @@
// to prevent memory leak
Py_DECREF(n);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->rrset->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
Modified: trunk/src/lib/dns/python/rrttl_python.cc
==============================================================================
--- trunk/src/lib/dns/python/rrttl_python.cc (original)
+++ trunk/src/lib/dns/python/rrttl_python.cc Wed Sep 22 06:28:23 2010
@@ -235,7 +235,7 @@
// to prevent memory leak
Py_DECREF(n);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->rrttl->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
Modified: trunk/src/lib/dns/python/rrtype_python.cc
==============================================================================
--- trunk/src/lib/dns/python/rrtype_python.cc (original)
+++ trunk/src/lib/dns/python/rrtype_python.cc Wed Sep 22 06:28:23 2010
@@ -273,7 +273,7 @@
// to prevent memory leak
Py_DECREF(n);
return (result);
- } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, (PyObject**) &mr)) {
+ } else if (PyArg_ParseTuple(args, "O!", &messagerenderer_type, &mr)) {
self->rrtype->toWire(*mr->messagerenderer);
// If we return NULL it is seen as an error, so use this for
// None returns
More information about the bind10-changes
mailing list