Commit ca8707b6 authored by Jelte Jansen's avatar Jelte Jansen

[2379] Add separate initializer for NameComparisonResult type

parent 5a34019b
......@@ -187,11 +187,7 @@ initModulePart_MessageRenderer(PyObject* mod) {
}
bool
initModulePart_Name(PyObject* mod) {
//
// NameComparisonResult
//
initModulePart_NameComparisonResult(PyObject* mod) {
if (!initClass(name_comparison_result_type,
"NameComparisonResult", mod)) {
return (false);
......@@ -215,10 +211,11 @@ initModulePart_Name(PyObject* mod) {
addClassVariable(name_comparison_result_type, "COMMONANCESTOR",
Py_BuildValue("I", NameComparisonResult::COMMONANCESTOR));
return (true);
}
//
// Name
//
bool
initModulePart_Name(PyObject* mod) {
if (!initClass(name_type, "Name", mod)) {
return (false);
}
......@@ -240,8 +237,6 @@ initModulePart_Name(PyObject* mod) {
addClassVariable(name_type, "ROOT_NAME",
createNameObject(Name::ROOT_NAME()));
// Add the exceptions to the module
try {
po_EmptyLabel = PyErr_NewException("pydnspp.EmptyLabel", NULL, NULL);
......@@ -785,6 +780,10 @@ PyInit_pydnspp(void) {
// for each part included above, we call its specific initializer
if (!initModulePart_NameComparisonResult(mod)) {
return (NULL);
}
if (!initModulePart_Name(mod)) {
return (NULL);
}
......
Markdown is supported
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