Commit 86c62978 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

removed unnecessary cast from pydnspp binding to help NetBSD compile

the code with -O2 (trac #348)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3001 e5f2f494-b856-4b98-b285-d166d9295462
parent d86eb342
......@@ -1535,7 +1535,7 @@ static PyObject*
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
......
......@@ -421,7 +421,7 @@ Name_toWire(s_Name* self, PyObject* args) {
// 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 @@ static PyObject*
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 @@ static PyObject*
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 @@ static PyObject*
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);
......
......@@ -254,8 +254,7 @@ Question_toWire(s_Question* self, PyObject* args) {
// 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
......
......@@ -195,7 +195,7 @@ Rdata_toWire(s_Rdata* self, PyObject* args) {
// 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
......
......@@ -236,7 +236,7 @@ RRClass_toWire(s_RRClass* self, PyObject* args) {
// 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
......
......@@ -315,7 +315,7 @@ RRset_toWire(s_RRset* self, PyObject* args) {
// 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
......
......@@ -235,7 +235,7 @@ RRTTL_toWire(s_RRTTL* self, PyObject* args) {
// 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
......
......@@ -273,7 +273,7 @@ RRType_toWire(s_RRType* self, PyObject* args) {
// 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment