From b75fd438e1457919e2851d8ab600eddf8ddde2cf Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Mon, 7 Jun 2010 13:37:25 +0000 Subject: removed some unnecessary comment lines added a few missing __str__ functions git-svn-id: svn://bind10.isc.org/svn/bind10/experiments/python-binding@2085 e5f2f494-b856-4b98-b285-d166d9295462 --- src/lib/dns/python/rrset_python.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib/dns/python/rrset_python.cc') diff --git a/src/lib/dns/python/rrset_python.cc b/src/lib/dns/python/rrset_python.cc index 2e8c8e204c..e3d20c4dae 100644 --- a/src/lib/dns/python/rrset_python.cc +++ b/src/lib/dns/python/rrset_python.cc @@ -65,6 +65,7 @@ static PyObject* RRset_getTTL(s_RRset* self); static PyObject* RRset_setName(s_RRset* self, PyObject* args); static PyObject* RRset_setTTL(s_RRset* self, PyObject* args); static PyObject* RRset_toText(s_RRset* self); +static PyObject* RRset_str(PyObject* self); static PyObject* RRset_toWire(s_RRset* self, PyObject* args); static PyObject* RRset_addRdata(s_RRset* self, PyObject* args); static PyObject* RRset_getRdata(s_RRset* self); @@ -117,7 +118,7 @@ static PyTypeObject rrset_type = { NULL, /* tp_as_mapping */ NULL, /* tp_hash */ NULL, /* tp_call */ - NULL, /* tp_str */ + RRset_str, /* tp_str */ NULL, /* tp_getattro */ NULL, /* tp_setattro */ NULL, /* tp_as_buffer */ @@ -311,6 +312,13 @@ RRset_toText(s_RRset* self) } } +static PyObject* +RRset_str(PyObject* self) +{ + // Simply call the to_text method we already defined + return PyObject_CallMethod(self, (char*)"to_text", (char*)""); +} + static PyObject* RRset_toWire(s_RRset* self, PyObject* args) { -- cgit v1.2.3