[svn] commit: r2237 - in /experiments/python-binding/src/lib/dns/python: message_python.cc messagerenderer_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 Jun 23 09:33:10 UTC 2010
Author: jelte
Date: Wed Jun 23 09:33:10 2010
New Revision: 2237
Log:
other simple review comment fixed; alignment of inline comments, and c++ style comments instead of c style
Modified:
experiments/python-binding/src/lib/dns/python/message_python.cc
experiments/python-binding/src/lib/dns/python/messagerenderer_python.cc
experiments/python-binding/src/lib/dns/python/name_python.cc
experiments/python-binding/src/lib/dns/python/question_python.cc
experiments/python-binding/src/lib/dns/python/rdata_python.cc
experiments/python-binding/src/lib/dns/python/rrclass_python.cc
experiments/python-binding/src/lib/dns/python/rrset_python.cc
experiments/python-binding/src/lib/dns/python/rrttl_python.cc
experiments/python-binding/src/lib/dns/python/rrtype_python.cc
Modified: experiments/python-binding/src/lib/dns/python/message_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/message_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/message_python.cc Wed Jun 23 09:33:10 2010
@@ -72,55 +72,55 @@
static PyTypeObject messageflag_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.MessageFlag",
- sizeof(s_MessageFlag), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)MessageFlag_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- NULL, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_MessageFlag), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)MessageFlag_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ NULL, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The MessageFlag class objects represent standard "
"flag bits of the header section of DNS messages.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- MessageFlag_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ MessageFlag_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
// TODO: Can we make this NULL? (no direct constructor)
- (initproc)MessageFlag_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ (initproc)MessageFlag_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
@@ -299,55 +299,55 @@
static PyTypeObject opcode_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Opcode",
- sizeof(s_Opcode), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Opcode_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- Opcode_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Opcode), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Opcode_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ Opcode_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Opcode class objects represent standard OPCODEs "
"of the header section of DNS messages.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)Opcode_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Opcode_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)Opcode_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Opcode_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
// TODO: Can we make this NULL? (no direct constructor)
- (initproc)Opcode_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ (initproc)Opcode_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
@@ -705,55 +705,55 @@
static PyTypeObject rcode_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Rcode",
- sizeof(s_Rcode), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Rcode_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- Rcode_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Rcode), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Rcode_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ Rcode_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Rcode class objects represent standard RCODEs"
"of the header section of DNS messages.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)Rcode_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Rcode_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)Rcode_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Rcode_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
// TODO: Can we make this NULL? (no direct constructor)
- (initproc)Rcode_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ (initproc)Rcode_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
@@ -1121,55 +1121,55 @@
static PyTypeObject section_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Section",
- sizeof(s_Section), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Section_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- NULL, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Section), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Section_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ NULL, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Section class objects represent DNS message sections such "
"as the header, question, or answer.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)Section_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Section_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)Section_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Section_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
// TODO: Can we make this NULL? (no direct constructor)
- (initproc)Section_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ (initproc)Section_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
@@ -1464,53 +1464,53 @@
static PyTypeObject message_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Message",
- sizeof(s_Message), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Message_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- Message_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Message), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Message_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ Message_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Message class encapsulates a standard DNS message.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Message_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Message_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Message_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)Message_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
@@ -1917,7 +1917,7 @@
bool
initModulePart_Message(PyObject* mod) {
- /* add methods to class */
+ // add methods to class
if (PyType_Ready(&messageflag_type) < 0) {
return false;
}
@@ -1952,10 +1952,9 @@
return false;
}
- /* Class variables
- * These are added to the tp_dict of the type object
- */
- //PyDict_SetItemString(message_type.tp_dict, "PARSE", Py_BuildValue("I", Message::PARSE));
+ // Class variables
+ // These are added to the tp_dict of the type object
+ //
addClassVariable(message_type, "PARSE", Py_BuildValue("I", Message::PARSE));
addClassVariable(message_type, "RENDER", Py_BuildValue("I", Message::RENDER));
addClassVariable(message_type, "DEFAULT_MAX_UDPSIZE", Py_BuildValue("I", Message::DEFAULT_MAX_UDPSIZE));
Modified: experiments/python-binding/src/lib/dns/python/messagerenderer_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/messagerenderer_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/messagerenderer_python.cc Wed Jun 23 09:33:10 2010
@@ -63,58 +63,58 @@
static PyTypeObject messagerenderer_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.MessageRenderer",
- sizeof(s_MessageRenderer), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)MessageRenderer_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- NULL, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_MessageRenderer), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)MessageRenderer_destroy,// tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ NULL, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The MessageRenderer class encapsulates implementation details "
"of rendering a DNS message into a buffer in wire format. "
"In effect, it's simply responsible for name compression at least in the "
"current implementation. A MessageRenderer class object manages the "
"positions of names rendered in a buffer and uses that information to render "
"subsequent names with compression.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- MessageRenderer_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)MessageRenderer_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ MessageRenderer_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)MessageRenderer_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
Modified: experiments/python-binding/src/lib/dns/python/name_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/name_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/name_python.cc Wed Jun 23 09:33:10 2010
@@ -73,24 +73,24 @@
static PyTypeObject name_comparison_result_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.NameComparisonResult",
- sizeof(s_NameComparisonResult), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)NameComparisonResult_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- NULL, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_NameComparisonResult), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)NameComparisonResult_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ NULL, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"This is a supplemental class used only as a return value of Name.compare(). "
"It encapsulate a tuple of the comparison: ordering, number of common labels, "
"and relationship as follows:\n"
@@ -98,34 +98,34 @@
"- labels: the number of common significant labels of the two names being"
" compared\n"
"- relationship: see NameComparisonResult.NameRelation\n",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- NameComparisonResult_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)NameComparisonResult_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ NameComparisonResult_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)NameComparisonResult_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
// TODO: is there also a way to just not define it?
@@ -229,56 +229,56 @@
static PyTypeObject name_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Name",
- sizeof(s_Name), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Name_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- Name_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Name), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Name_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ Name_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Name class encapsulates DNS names.\n"
"It provides interfaces to construct a name from string or wire-format data, "
"transform a name into a string or wire-format data, compare two names, get "
"access to various properties of a name, etc.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)Name_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Name_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Name_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)Name_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Name_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)Name_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
@@ -287,7 +287,7 @@
const char* s;
PyObject* downcase = Py_False;
- /* fromText */
+ // fromText
if (PyArg_ParseTuple(args, "s|O!", &s, &PyBool_Type, &downcase)) {
try {
const std::string n(s);
@@ -330,7 +330,7 @@
Py_ssize_t len;
unsigned int position = 0;
- /* fromWire */
+ // fromWire
if (PyArg_ParseTuple(args, "O|IO!", &bytes_obj, &position,
&PyBool_Type, &downcase) &&
PyObject_AsCharBuffer(bytes_obj, &bytes, &len) != -1) {
@@ -664,12 +664,12 @@
po_InvalidBufferPosition = PyErr_NewException("libdns_python.InvalidBufferPosition", NULL, NULL);
PyModule_AddObject(mod, "InvalidBufferPosition", po_InvalidBufferPosition);
- /* TODO; this one is a message-specific one, move to message? */
+ // TODO; this one is a message-specific one, move to message?
po_DNSMessageFORMERR = PyErr_NewException("libdns_python.DNSMessageFORMERR", NULL, NULL);
Py_INCREF(po_DNSMessageFORMERR);
PyModule_AddObject(mod, "DNSMessageFORMERR", po_DNSMessageFORMERR);
- /* TODO: this one is module-level, move to libdns_python.cc */
+ // TODO: this one is module-level, move to libdns_python.cc
po_IscException = PyErr_NewException("libdns_python.IscException", NULL, NULL);
Py_INCREF(po_IncompleteName);
PyModule_AddObject(mod, "IscException", po_IscException);
Modified: experiments/python-binding/src/lib/dns/python/question_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/question_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/question_python.cc Wed Jun 23 09:33:10 2010
@@ -77,54 +77,54 @@
static PyTypeObject question_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Question",
- sizeof(s_Question), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Question_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- Question_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Question), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Question_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ Question_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Question class encapsulates the common search key of DNS"
"lookup, consisting of owner name, RR type and RR class.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Question_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Question_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Question_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)Question_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
Modified: experiments/python-binding/src/lib/dns/python/rdata_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/rdata_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/rdata_python.cc Wed Jun 23 09:33:10 2010
@@ -86,54 +86,54 @@
static PyTypeObject rdata_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.Rdata",
- sizeof(s_Rdata), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Rdata_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- Rdata_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_Rdata), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)Rdata_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ Rdata_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The Rdata class is an abstract base class that provides "
"a set of common interfaces to manipulate concrete RDATA objects.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Rdata_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Rdata_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ Rdata_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)Rdata_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
Modified: experiments/python-binding/src/lib/dns/python/rrclass_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/rrclass_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/rrclass_python.cc Wed Jun 23 09:33:10 2010
@@ -101,56 +101,56 @@
static PyTypeObject rrclass_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.RRClass",
- sizeof(s_RRClass), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)RRClass_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- RRClass_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_RRClass), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)RRClass_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ RRClass_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The RRClass class encapsulates DNS resource record classes.\n"
"This class manages the 16-bit integer class codes in quite a straightforward"
"way. The only non trivial task is to handle textual representations of"
"RR classes, such as \"IN\", \"CH\", or \"CLASS65534\".",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)RRClass_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- RRClass_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)RRClass_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)RRClass_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ RRClass_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)RRClass_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
@@ -188,8 +188,8 @@
PyErr_Clear();
return 0;
}
- /* Incomplete is never thrown, a type error would have already been raised
- * when we try to read the 2 bytes above */
+ // Incomplete is never thrown, a type error would have already been raised
+ //when we try to read the 2 bytes above
} catch (InvalidRRClass ic) {
PyErr_Clear();
PyErr_SetString(po_InvalidRRClass, ic.what());
Modified: experiments/python-binding/src/lib/dns/python/rrset_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/rrset_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/rrset_python.cc Wed Jun 23 09:33:10 2010
@@ -105,24 +105,24 @@
static PyTypeObject rrset_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.RRset",
- sizeof(s_RRset), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)RRset_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- RRset_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_RRset), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)RRset_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ RRset_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The AbstractRRset class is an abstract base class that "
"models a DNS RRset.\n\n"
"An object of (a specific derived class of) AbstractRRset "
@@ -139,34 +139,34 @@
"This is because such checks can be expensive, and it's often easy to "
"ensure the uniqueness requirement at the %data preparation phase "
"(e.g. when loading a zone).",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- RRset_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)RRset_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ NULL, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ RRset_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)RRset_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
Modified: experiments/python-binding/src/lib/dns/python/rrttl_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/rrttl_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/rrttl_python.cc Wed Jun 23 09:33:10 2010
@@ -88,58 +88,58 @@
static PyTypeObject rrttl_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.RRTTL",
- sizeof(s_RRTTL), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)RRTTL_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- RRTTL_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_RRTTL), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)RRTTL_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ RRTTL_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The RRTTL class encapsulates TTLs used in DNS resource records.\n\n"
"This is a straightforward class; an RRTTL object simply maintains a "
"32-bit unsigned integer corresponding to the TTL value. The main purpose "
"of this class is to provide convenient interfaces to convert a textual "
"representation into the integer TTL value and vice versa, and to handle "
"wire-format representations.",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)RRTTL_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- RRTTL_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)RRTTL_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)RRTTL_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ RRTTL_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)RRTTL_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
Modified: experiments/python-binding/src/lib/dns/python/rrtype_python.cc
==============================================================================
--- experiments/python-binding/src/lib/dns/python/rrtype_python.cc (original)
+++ experiments/python-binding/src/lib/dns/python/rrtype_python.cc Wed Jun 23 09:33:10 2010
@@ -152,56 +152,56 @@
static PyTypeObject rrtype_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"libdns_python.RRType",
- sizeof(s_RRType), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)RRType_destroy, /* tp_dealloc */
- NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_reserved */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- RRType_str, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ sizeof(s_RRType), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)RRType_destroy, // tp_dealloc
+ NULL, // tp_print
+ NULL, // tp_getattr
+ NULL, // tp_setattr
+ NULL, // tp_reserved
+ NULL, // tp_repr
+ NULL, // tp_as_number
+ NULL, // tp_as_sequence
+ NULL, // tp_as_mapping
+ NULL, // tp_hash
+ NULL, // tp_call
+ RRType_str, // tp_str
+ NULL, // tp_getattro
+ NULL, // tp_setattro
+ NULL, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT, // tp_flags
"The RRType class encapsulates DNS resource record types.\n\n"
"This class manages the 16-bit integer type codes in quite a straightforward "
"way. The only non trivial task is to handle textual representations of "
"RR types, such as \"A\", \"AAAA\", or \"TYPE65534\".",
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- (richcmpfunc)RRType_richcmp, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- RRType_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)RRType_init, /* tp_init */
- NULL, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- NULL, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
+ NULL, // tp_traverse
+ NULL, // tp_clear
+ (richcmpfunc)RRType_richcmp, // tp_richcompare
+ 0, // tp_weaklistoffset
+ NULL, // tp_iter
+ NULL, // tp_iternext
+ RRType_methods, // tp_methods
+ NULL, // tp_members
+ NULL, // tp_getset
+ NULL, // tp_base
+ NULL, // tp_dict
+ NULL, // tp_descr_get
+ NULL, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)RRType_init, // tp_init
+ NULL, // tp_alloc
+ PyType_GenericNew, // tp_new
+ NULL, // tp_free
+ NULL, // tp_is_gc
+ NULL, // tp_bases
+ NULL, // tp_mro
+ NULL, // tp_cache
+ NULL, // tp_subclasses
+ NULL, // tp_weaklist
// Note: not sure if the following are correct. Added them just to
// make the compiler happy.
- NULL, /* tp_del */
- 0 /* tp_version_tag */
+ NULL, // tp_del
+ 0 // tp_version_tag
};
static int
More information about the bind10-changes
mailing list