|
@@ -72,55 +72,55 @@ static PyMethodDef MessageFlag_methods[] = {
|
|
|
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 PyMethodDef Opcode_methods[] = {
|
|
|
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 PyMethodDef Rcode_methods[] = {
|
|
|
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 PyMethodDef Section_methods[] = {
|
|
|
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 PyMethodDef Message_methods[] = {
|
|
|
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 @@ Message_fromWire(s_Message* self, PyObject* args) {
|
|
|
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 @@ initModulePart_Message(PyObject* mod) {
|
|
|
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));
|