diff options
author | Jelte Jansen <jelte@isc.org> | 2010-06-07 15:37:25 +0200 |
---|---|---|
committer | Jelte Jansen <jelte@isc.org> | 2010-06-07 15:37:25 +0200 |
commit | b75fd438e1457919e2851d8ab600eddf8ddde2cf (patch) | |
tree | 225840e76cb47a1935e66be4962eff1bb40d20da /src/lib/dns/python/rrset_python.cc | |
parent | oh no, more docs! (diff) | |
download | kea-b75fd438e1457919e2851d8ab600eddf8ddde2cf.tar.xz kea-b75fd438e1457919e2851d8ab600eddf8ddde2cf.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/lib/dns/python/rrset_python.cc | 10 |
1 files changed, 9 insertions, 1 deletions
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 */ @@ -312,6 +313,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) { PyObject* bytes; |