summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelte Jansen <jelte@isc.org>2011-09-15 21:09:15 +0200
committerJelte Jansen <jelte@isc.org>2011-09-15 21:09:15 +0200
commit9c53309978b4a4bf684b3abbb853876c5413f875 (patch)
tree1548a1d1e74627d2ef574acb6071c432b378f6c5
parent[1245] editorial cleanups: removed unnecesary 'static'; fixed typo in comments. (diff)
downloadkea-9c53309978b4a4bf684b3abbb853876c5413f875.tar.xz
kea-9c53309978b4a4bf684b3abbb853876c5413f875.zip
[1245] remove initModule from headers
and move it to an internal namespace move the declaration of the functions to pydnspp.cc
-rw-r--r--src/lib/dns/python/edns_python.cc2
-rw-r--r--src/lib/dns/python/edns_python.h2
-rw-r--r--src/lib/dns/python/message_python.cc2
-rw-r--r--src/lib/dns/python/message_python.h2
-rw-r--r--src/lib/dns/python/messagerenderer_python.cc3
-rw-r--r--src/lib/dns/python/messagerenderer_python.h2
-rw-r--r--src/lib/dns/python/name_python.cc2
-rw-r--r--src/lib/dns/python/name_python.h2
-rw-r--r--src/lib/dns/python/opcode_python.cc2
-rw-r--r--src/lib/dns/python/opcode_python.h3
-rw-r--r--src/lib/dns/python/pydnspp.cc50
-rw-r--r--src/lib/dns/python/question_python.cc2
-rw-r--r--src/lib/dns/python/question_python.h2
-rw-r--r--src/lib/dns/python/rcode_python.cc2
-rw-r--r--src/lib/dns/python/rcode_python.h2
-rw-r--r--src/lib/dns/python/rdata_python.cc2
-rw-r--r--src/lib/dns/python/rdata_python.h2
-rw-r--r--src/lib/dns/python/rrclass_python.cc2
-rw-r--r--src/lib/dns/python/rrclass_python.h2
-rw-r--r--src/lib/dns/python/rrset_python.cc2
-rw-r--r--src/lib/dns/python/rrset_python.h2
-rw-r--r--src/lib/dns/python/rrttl_python.cc2
-rw-r--r--src/lib/dns/python/rrttl_python.h2
-rw-r--r--src/lib/dns/python/rrtype_python.cc2
-rw-r--r--src/lib/dns/python/rrtype_python.h2
-rw-r--r--src/lib/dns/python/tsig_python.cc5
-rw-r--r--src/lib/dns/python/tsig_python.h2
-rw-r--r--src/lib/dns/python/tsig_rdata_python.cc6
-rw-r--r--src/lib/dns/python/tsig_rdata_python.h2
-rw-r--r--src/lib/dns/python/tsigerror_python.cc6
-rw-r--r--src/lib/dns/python/tsigerror_python.h2
-rw-r--r--src/lib/dns/python/tsigkey_python.cc14
-rw-r--r--src/lib/dns/python/tsigkey_python.h3
-rw-r--r--src/lib/dns/python/tsigrecord_python.cc4
-rw-r--r--src/lib/dns/python/tsigrecord_python.h2
35 files changed, 83 insertions, 63 deletions
diff --git a/src/lib/dns/python/edns_python.cc b/src/lib/dns/python/edns_python.cc
index 79154656c0..cab57be415 100644
--- a/src/lib/dns/python/edns_python.cc
+++ b/src/lib/dns/python/edns_python.cc
@@ -349,6 +349,7 @@ PyTypeObject edns_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_EDNS(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -366,6 +367,7 @@ initModulePart_EDNS(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // end namespace python
} // end namespace dns
diff --git a/src/lib/dns/python/edns_python.h b/src/lib/dns/python/edns_python.h
index 94b082004f..4f90460e50 100644
--- a/src/lib/dns/python/edns_python.h
+++ b/src/lib/dns/python/edns_python.h
@@ -35,8 +35,6 @@ public:
extern PyTypeObject edns_type;
-bool initModulePart_EDNS(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/message_python.cc b/src/lib/dns/python/message_python.cc
index cd945fb4f3..214e254a38 100644
--- a/src/lib/dns/python/message_python.cc
+++ b/src/lib/dns/python/message_python.cc
@@ -750,6 +750,7 @@ PyTypeObject message_type = {
};
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_Message(PyObject* mod) {
if (PyType_Ready(&message_type) < 0) {
@@ -816,6 +817,7 @@ initModulePart_Message(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // end python namespace
} // end dns namespace
diff --git a/src/lib/dns/python/message_python.h b/src/lib/dns/python/message_python.h
index 325eb8e14b..1a86528e52 100644
--- a/src/lib/dns/python/message_python.h
+++ b/src/lib/dns/python/message_python.h
@@ -40,8 +40,6 @@ public:
extern PyTypeObject message_type;
-bool initModulePart_Message(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/messagerenderer_python.cc b/src/lib/dns/python/messagerenderer_python.cc
index 3aa2deef44..f880a99576 100644
--- a/src/lib/dns/python/messagerenderer_python.cc
+++ b/src/lib/dns/python/messagerenderer_python.cc
@@ -225,6 +225,7 @@ PyTypeObject messagerenderer_type = {
0 // tp_version_tag
};
+namespace internal {
bool initModulePart_MessageRenderer(PyObject* mod) {
if (PyType_Ready(&messagerenderer_type) < 0) {
return (false);
@@ -241,6 +242,8 @@ bool initModulePart_MessageRenderer(PyObject* mod) {
return (true);
}
+} // end namespace internal
+
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/messagerenderer_python.h b/src/lib/dns/python/messagerenderer_python.h
index cc28e437f5..18e0ef955b 100644
--- a/src/lib/dns/python/messagerenderer_python.h
+++ b/src/lib/dns/python/messagerenderer_python.h
@@ -38,8 +38,6 @@ public:
extern PyTypeObject messagerenderer_type;
-bool initModulePart_MessageRenderer(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/name_python.cc b/src/lib/dns/python/name_python.cc
index 2546f6ab59..76b9d7294b 100644
--- a/src/lib/dns/python/name_python.cc
+++ b/src/lib/dns/python/name_python.cc
@@ -624,6 +624,7 @@ PyTypeObject name_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_Name(PyObject* mod) {
// Add the classes to the module
@@ -704,6 +705,7 @@ initModulePart_Name(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createNameObject(const Name& source) {
diff --git a/src/lib/dns/python/name_python.h b/src/lib/dns/python/name_python.h
index 4a4b611318..4a5df69ae2 100644
--- a/src/lib/dns/python/name_python.h
+++ b/src/lib/dns/python/name_python.h
@@ -61,8 +61,6 @@ public:
extern PyTypeObject name_comparison_result_type;
extern PyTypeObject name_type;
-bool initModulePart_Name(PyObject* mod);
-
/// This is A simple shortcut to create a python Name object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference
diff --git a/src/lib/dns/python/opcode_python.cc b/src/lib/dns/python/opcode_python.cc
index 14e2056b5b..ee4bce7dc1 100644
--- a/src/lib/dns/python/opcode_python.cc
+++ b/src/lib/dns/python/opcode_python.cc
@@ -330,6 +330,7 @@ PyTypeObject opcode_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_Opcode(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -380,6 +381,7 @@ initModulePart_Opcode(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // end python namespace
} // end dns namespace
diff --git a/src/lib/dns/python/opcode_python.h b/src/lib/dns/python/opcode_python.h
index 79860e4c2b..84adf7a7ca 100644
--- a/src/lib/dns/python/opcode_python.h
+++ b/src/lib/dns/python/opcode_python.h
@@ -36,11 +36,8 @@ public:
bool static_code;
};
-
extern PyTypeObject opcode_type;
-bool initModulePart_Opcode(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/pydnspp.cc b/src/lib/dns/python/pydnspp.cc
index 91ec3d11f9..e87d13b55e 100644
--- a/src/lib/dns/python/pydnspp.cc
+++ b/src/lib/dns/python/pydnspp.cc
@@ -38,25 +38,41 @@
#include <dns/messagerenderer.h>
#include "pydnspp_common.h"
-#include "messagerenderer_python.h"
-#include "name_python.h"
-#include "rrclass_python.h"
-#include "rrtype_python.h"
-#include "rrttl_python.h"
-#include "rdata_python.h"
-#include "rcode_python.h"
-#include "opcode_python.h"
-#include "rrset_python.h"
-#include "tsigkey_python.h"
-#include "tsig_rdata_python.h"
-#include "tsigerror_python.h"
-#include "tsigrecord_python.h"
-#include "tsig_python.h"
-#include "question_python.h"
-#include "message_python.h"
-#include "edns_python.h"
+/* Note that we do forward declarations of the initialization functions here,
+ * and these are not defined in headers (since they are not to be used in any
+ * other place */
+namespace isc {
+namespace dns {
+namespace python {
+namespace internal {
+
+bool initModulePart_EDNS(PyObject* mod);
+bool initModulePart_Message(PyObject* mod);
+bool initModulePart_MessageRenderer(PyObject* mod);
+bool initModulePart_Name(PyObject* mod);
+bool initModulePart_Opcode(PyObject* mod);
+bool initModulePart_Question(PyObject* mod);
+bool initModulePart_Rcode(PyObject* mod);
+bool initModulePart_Rdata(PyObject* mod);
+bool initModulePart_RRClass(PyObject* mod);
+bool initModulePart_RRset(PyObject* mod);
+bool initModulePart_RRTTL(PyObject* mod);
+bool initModulePart_RRType(PyObject* mod);
+bool initModulePart_TSIGError(PyObject* mod);
+bool initModulePart_TSIGKey(PyObject* mod);
+bool initModulePart_TSIGKeyRing(PyObject* mod);
+bool initModulePart_TSIGContext(PyObject* mod);
+bool initModulePart_TSIG(PyObject* mod);
+bool initModulePart_TSIGRecord(PyObject* mod);
+
+}
+} // namespace python
+} // namespace dns
+} // namespace isc
+
using namespace isc::dns::python;
+using namespace isc::dns::python::internal;
//
// Definition of the module
diff --git a/src/lib/dns/python/question_python.cc b/src/lib/dns/python/question_python.cc
index 234009e8c6..06aaf57c50 100644
--- a/src/lib/dns/python/question_python.cc
+++ b/src/lib/dns/python/question_python.cc
@@ -273,6 +273,7 @@ PyTypeObject question_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_Question(PyObject* mod) {
// Add the exceptions to the module
@@ -289,6 +290,7 @@ initModulePart_Question(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // end python namespace
} // end dns namespace
diff --git a/src/lib/dns/python/question_python.h b/src/lib/dns/python/question_python.h
index a4ee5371a5..b602f06c1e 100644
--- a/src/lib/dns/python/question_python.h
+++ b/src/lib/dns/python/question_python.h
@@ -37,8 +37,6 @@ public:
extern PyTypeObject question_type;
-bool initModulePart_Question(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/rcode_python.cc b/src/lib/dns/python/rcode_python.cc
index 0208d98406..5cb7e8bfac 100644
--- a/src/lib/dns/python/rcode_python.cc
+++ b/src/lib/dns/python/rcode_python.cc
@@ -361,6 +361,7 @@ PyTypeObject rcode_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_Rcode(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -413,6 +414,7 @@ initModulePart_Rcode(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/rcode_python.h b/src/lib/dns/python/rcode_python.h
index 5d9b91dfaa..68abd1c389 100644
--- a/src/lib/dns/python/rcode_python.h
+++ b/src/lib/dns/python/rcode_python.h
@@ -45,8 +45,6 @@ public:
extern PyTypeObject rcode_type;
-bool initModulePart_Rcode(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/rdata_python.cc b/src/lib/dns/python/rdata_python.cc
index 8596d74a0a..99575a218e 100644
--- a/src/lib/dns/python/rdata_python.cc
+++ b/src/lib/dns/python/rdata_python.cc
@@ -253,6 +253,7 @@ PyTypeObject rdata_type = {
0 // tp_version_tag
};
+namespace internal {
// Module Initialization, all statics are initialized here
bool
initModulePart_Rdata(PyObject* mod) {
@@ -279,6 +280,7 @@ initModulePart_Rdata(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // end python namespace
} // end dns namespace
diff --git a/src/lib/dns/python/rdata_python.h b/src/lib/dns/python/rdata_python.h
index e9c86678c4..3f09d13a5c 100644
--- a/src/lib/dns/python/rdata_python.h
+++ b/src/lib/dns/python/rdata_python.h
@@ -37,8 +37,6 @@ public:
extern PyTypeObject rdata_type;
-bool initModulePart_Rdata(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/rrclass_python.cc b/src/lib/dns/python/rrclass_python.cc
index a2d4688654..005541c286 100644
--- a/src/lib/dns/python/rrclass_python.cc
+++ b/src/lib/dns/python/rrclass_python.cc
@@ -331,6 +331,7 @@ PyTypeObject rrclass_type = {
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_RRClass(PyObject* mod) {
// Add the exceptions to the module
@@ -353,6 +354,7 @@ initModulePart_RRClass(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createRRClassObject(const RRClass& source) {
diff --git a/src/lib/dns/python/rrclass_python.h b/src/lib/dns/python/rrclass_python.h
index 6ad733f6ef..b0c6289d90 100644
--- a/src/lib/dns/python/rrclass_python.h
+++ b/src/lib/dns/python/rrclass_python.h
@@ -39,8 +39,6 @@ public:
extern PyTypeObject rrclass_type;
-bool initModulePart_RRClass(PyObject* mod);
-
/// This is a simple shortcut to create a python RRClass object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference
diff --git a/src/lib/dns/python/rrset_python.cc b/src/lib/dns/python/rrset_python.cc
index cdcd50fb9b..197fbdf221 100644
--- a/src/lib/dns/python/rrset_python.cc
+++ b/src/lib/dns/python/rrset_python.cc
@@ -393,6 +393,7 @@ PyTypeObject rrset_type = {
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_RRset(PyObject* mod) {
// Add the exceptions to the module
@@ -417,6 +418,7 @@ initModulePart_RRset(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createRRsetObject(const RRset& source) {
diff --git a/src/lib/dns/python/rrset_python.h b/src/lib/dns/python/rrset_python.h
index e43de2858d..6c083a35ad 100644
--- a/src/lib/dns/python/rrset_python.h
+++ b/src/lib/dns/python/rrset_python.h
@@ -46,8 +46,6 @@ public:
extern PyTypeObject rrset_type;
-bool initModulePart_RRset(PyObject* mod);
-
/// This is a simple shortcut to create a python RRset object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference
diff --git a/src/lib/dns/python/rrttl_python.cc b/src/lib/dns/python/rrttl_python.cc
index e6bab0c227..4720bfbdda 100644
--- a/src/lib/dns/python/rrttl_python.cc
+++ b/src/lib/dns/python/rrttl_python.cc
@@ -285,6 +285,7 @@ PyTypeObject rrttl_type = {
};
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_RRTTL(PyObject* mod) {
// Add the exceptions to the module
@@ -305,6 +306,7 @@ initModulePart_RRTTL(PyObject* mod) {
return (true);
}
+} // end namespace internal
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/rrttl_python.h b/src/lib/dns/python/rrttl_python.h
index 2b77540f6d..36f7a99dff 100644
--- a/src/lib/dns/python/rrttl_python.h
+++ b/src/lib/dns/python/rrttl_python.h
@@ -40,8 +40,6 @@ public:
extern PyTypeObject rrttl_type;
-bool initModulePart_RRTTL(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/rrtype_python.cc b/src/lib/dns/python/rrtype_python.cc
index c1bc25c991..fecd89c579 100644
--- a/src/lib/dns/python/rrtype_python.cc
+++ b/src/lib/dns/python/rrtype_python.cc
@@ -428,6 +428,7 @@ PyTypeObject rrtype_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_RRType(PyObject* mod) {
// Add the exceptions to the module
@@ -448,6 +449,7 @@ initModulePart_RRType(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createRRTypeObject(const RRType& source) {
diff --git a/src/lib/dns/python/rrtype_python.h b/src/lib/dns/python/rrtype_python.h
index 5a69e04ccf..6aa4ffda68 100644
--- a/src/lib/dns/python/rrtype_python.h
+++ b/src/lib/dns/python/rrtype_python.h
@@ -40,8 +40,6 @@ public:
extern PyTypeObject rrtype_type;
-bool initModulePart_RRType(PyObject* mod);
-
/// This is a simple shortcut to create a python RRType object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference
diff --git a/src/lib/dns/python/tsig_python.cc b/src/lib/dns/python/tsig_python.cc
index db93a086d1..678cb17f33 100644
--- a/src/lib/dns/python/tsig_python.cc
+++ b/src/lib/dns/python/tsig_python.cc
@@ -264,7 +264,7 @@ PyTypeObject tsigcontext_type = {
NULL, // tp_as_number
NULL, // tp_as_sequence
NULL, // tp_as_mapping
- NULL, // tp_hash
+ NULL, // tp_hash
NULL, // tp_call
NULL, // tp_str
NULL, // tp_getattro
@@ -308,6 +308,7 @@ PyTypeObject tsigcontext_type = {
};
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_TSIGContext(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -359,6 +360,8 @@ initModulePart_TSIGContext(PyObject* mod) {
return (true);
}
+} // end namespace internal
+
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/tsig_python.h b/src/lib/dns/python/tsig_python.h
index 1985c8226f..fd0f6a42b9 100644
--- a/src/lib/dns/python/tsig_python.h
+++ b/src/lib/dns/python/tsig_python.h
@@ -35,8 +35,6 @@ extern PyTypeObject tsigcontext_type;
// Class specific exceptions
extern PyObject* po_TSIGContextError;
-bool initModulePart_TSIGContext(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/tsig_rdata_python.cc b/src/lib/dns/python/tsig_rdata_python.cc
index ebaa0ca895..1bf8234b55 100644
--- a/src/lib/dns/python/tsig_rdata_python.cc
+++ b/src/lib/dns/python/tsig_rdata_python.cc
@@ -236,7 +236,7 @@ TSIG_toWire(const s_TSIG* const self, PyObject* args) {
self, args));
}
-PyObject*
+PyObject*
TSIG_richcmp(const s_TSIG* const self,
const s_TSIG* const other,
const int op)
@@ -303,7 +303,7 @@ PyTypeObject tsig_type = {
NULL, // tp_as_number
NULL, // tp_as_sequence
NULL, // tp_as_mapping
- NULL, // tp_hash
+ NULL, // tp_hash
NULL, // tp_call
TSIG_str, // tp_str
NULL, // tp_getattro
@@ -342,6 +342,7 @@ PyTypeObject tsig_type = {
};
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_TSIG(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -358,6 +359,7 @@ initModulePart_TSIG(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createTSIGObject(const any::TSIG& source) {
diff --git a/src/lib/dns/python/tsig_rdata_python.h b/src/lib/dns/python/tsig_rdata_python.h
index e5e0c6cbb0..48a2d6a200 100644
--- a/src/lib/dns/python/tsig_rdata_python.h
+++ b/src/lib/dns/python/tsig_rdata_python.h
@@ -36,8 +36,6 @@ public:
extern PyTypeObject tsig_type;
-bool initModulePart_TSIG(PyObject* mod);
-
/// This is A simple shortcut to create a python TSIG object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference
diff --git a/src/lib/dns/python/tsigerror_python.cc b/src/lib/dns/python/tsigerror_python.cc
index 0ad471649a..53d294c603 100644
--- a/src/lib/dns/python/tsigerror_python.cc
+++ b/src/lib/dns/python/tsigerror_python.cc
@@ -190,7 +190,7 @@ TSIGError_toRcode(const s_TSIGError* const self) {
return (NULL);
}
-PyObject*
+PyObject*
TSIGError_richcmp(const s_TSIGError* const self,
const s_TSIGError* const other,
const int op)
@@ -252,7 +252,7 @@ PyTypeObject tsigerror_type = {
NULL, // tp_as_number
NULL, // tp_as_sequence
NULL, // tp_as_mapping
- NULL, // tp_hash
+ NULL, // tp_hash
NULL, // tp_call
// THIS MAY HAVE TO BE CHANGED TO NULL:
TSIGError_str, // tp_str
@@ -300,6 +300,7 @@ installTSIGErrorConstant(const char* name, const TSIGError& val) {
}
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_TSIGError(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -358,6 +359,7 @@ initModulePart_TSIGError(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createTSIGErrorObject(const TSIGError& source) {
diff --git a/src/lib/dns/python/tsigerror_python.h b/src/lib/dns/python/tsigerror_python.h
index 9cb1b5dfe9..da028a07fa 100644
--- a/src/lib/dns/python/tsigerror_python.h
+++ b/src/lib/dns/python/tsigerror_python.h
@@ -32,8 +32,6 @@ public:
extern PyTypeObject tsigerror_type;
-bool initModulePart_TSIGError(PyObject* mod);
-
/// This is A simple shortcut to create a python TSIGError object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference
diff --git a/src/lib/dns/python/tsigkey_python.cc b/src/lib/dns/python/tsigkey_python.cc
index f0906cb449..abd412f76b 100644
--- a/src/lib/dns/python/tsigkey_python.cc
+++ b/src/lib/dns/python/tsigkey_python.cc
@@ -196,7 +196,7 @@ PyTypeObject tsigkey_type = {
NULL, // tp_as_number
NULL, // tp_as_sequence
NULL, // tp_as_mapping
- NULL, // tp_hash
+ NULL, // tp_hash
NULL, // tp_call
NULL, // tp_str
NULL, // tp_getattro
@@ -234,6 +234,7 @@ PyTypeObject tsigkey_type = {
};
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_TSIGKey(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -276,6 +277,8 @@ initModulePart_TSIGKey(PyObject* mod) {
return (true);
}
+} // end namespace internal
+
} // namespace python
} // namespace dns
} // namespace isc
@@ -329,7 +332,7 @@ TSIGKeyRing_init(s_TSIGKeyRing* self, PyObject* args) {
"Invalid arguments to TSIGKeyRing constructor");
return (-1);
}
-
+
self->cppobj = new(nothrow) TSIGKeyRing();
if (self->cppobj == NULL) {
PyErr_SetString(po_IscException, "Allocating TSIGKeyRing failed");
@@ -354,7 +357,7 @@ TSIGKeyRing_size(const s_TSIGKeyRing* const self) {
PyObject*
TSIGKeyRing_add(const s_TSIGKeyRing* const self, PyObject* args) {
s_TSIGKey* tsigkey;
-
+
if (PyArg_ParseTuple(args, "O!", &tsigkey_type, &tsigkey)) {
try {
const TSIGKeyRing::Result result =
@@ -436,7 +439,7 @@ PyTypeObject tsigkeyring_type = {
NULL, // tp_as_number
NULL, // tp_as_sequence
NULL, // tp_as_mapping
- NULL, // tp_hash
+ NULL, // tp_hash
NULL, // tp_call
NULL, // tp_str
NULL, // tp_getattro
@@ -472,6 +475,7 @@ PyTypeObject tsigkeyring_type = {
0 // tp_version_tag
};
+namespace internal {
bool
initModulePart_TSIGKeyRing(PyObject* mod) {
if (PyType_Ready(&tsigkeyring_type) < 0) {
@@ -494,6 +498,8 @@ initModulePart_TSIGKeyRing(PyObject* mod) {
return (true);
}
+} // end namespace internal
+
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/tsigkey_python.h b/src/lib/dns/python/tsigkey_python.h
index 980edc5329..f9b9573dbe 100644
--- a/src/lib/dns/python/tsigkey_python.h
+++ b/src/lib/dns/python/tsigkey_python.h
@@ -39,9 +39,6 @@ public:
extern PyTypeObject tsigkey_type;
extern PyTypeObject tsigkeyring_type;
-bool initModulePart_TSIGKey(PyObject* mod);
-bool initModulePart_TSIGKeyRing(PyObject* mod);
-
} // namespace python
} // namespace dns
} // namespace isc
diff --git a/src/lib/dns/python/tsigrecord_python.cc b/src/lib/dns/python/tsigrecord_python.cc
index 8a78b5e3a4..974cb22a6b 100644
--- a/src/lib/dns/python/tsigrecord_python.cc
+++ b/src/lib/dns/python/tsigrecord_python.cc
@@ -226,7 +226,7 @@ PyTypeObject tsigrecord_type = {
NULL, // tp_as_number
NULL, // tp_as_sequence
NULL, // tp_as_mapping
- NULL, // tp_hash
+ NULL, // tp_hash
NULL, // tp_call
TSIGRecord_str, // tp_str
NULL, // tp_getattro
@@ -263,6 +263,7 @@ PyTypeObject tsigrecord_type = {
};
// Module Initialization, all statics are initialized here
+namespace internal {
bool
initModulePart_TSIGRecord(PyObject* mod) {
// We initialize the static description object with PyType_Ready(),
@@ -298,6 +299,7 @@ initModulePart_TSIGRecord(PyObject* mod) {
return (true);
}
+} // end namespace internal
PyObject*
createTSIGRecordObject(const TSIGRecord& source) {
diff --git a/src/lib/dns/python/tsigrecord_python.h b/src/lib/dns/python/tsigrecord_python.h
index ef9669b33a..3b027184c9 100644
--- a/src/lib/dns/python/tsigrecord_python.h
+++ b/src/lib/dns/python/tsigrecord_python.h
@@ -32,8 +32,6 @@ public:
extern PyTypeObject tsigrecord_type;
-bool initModulePart_TSIGRecord(PyObject* mod);
-
/// This is A simple shortcut to create a python TSIGRecord object (in the
/// form of a pointer to PyObject) with minimal exception safety.
/// On success, it returns a valid pointer to PyObject with a reference