Commit 96e05eca authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2437] Merge branch 'trac2438' into trac2437

parents c85c06e9 c6f04a39
...@@ -352,7 +352,7 @@ PyMethodDef RRsetCollection_methods[] = { ...@@ -352,7 +352,7 @@ PyMethodDef RRsetCollection_methods[] = {
// This defines the complete type for reflection in python and // This defines the complete type for reflection in python and
// parsing of PyObject* to s_RRsetCollection // parsing of PyObject* to s_RRsetCollection
// Most of the functions are not actually implemented and NULL here. // Most of the functions are not actually implemented and NULL here.
PyTypeObject rrsetcollection_type = { PyTypeObject rrset_collection_type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"dns.RRsetCollection", "dns.RRsetCollection",
sizeof(s_RRsetCollection), // tp_basicsize sizeof(s_RRsetCollection), // tp_basicsize
...@@ -408,15 +408,15 @@ initModulePart_RRsetCollection(PyObject* mod) { ...@@ -408,15 +408,15 @@ initModulePart_RRsetCollection(PyObject* mod) {
// We initialize the static description object with PyType_Ready(), // We initialize the static description object with PyType_Ready(),
// then add it to the module. This is not just a check! (leaving // then add it to the module. This is not just a check! (leaving
// this out results in segmentation faults) // this out results in segmentation faults)
if (PyType_Ready(&rrsetcollection_type) < 0) { if (PyType_Ready(&rrset_collection_type) < 0) {
return (false); return (false);
} }
void* p = &rrsetcollection_type; void* p = &rrset_collection_type;
if (PyModule_AddObject(mod, "RRsetCollection", if (PyModule_AddObject(mod, "RRsetCollection",
static_cast<PyObject*>(p)) < 0) { static_cast<PyObject*>(p)) < 0) {
return (false); return (false);
} }
Py_INCREF(&rrsetcollection_type); Py_INCREF(&rrset_collection_type);
return (true); return (true);
} }
......
Supports Markdown
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