Browse Source

[1245] use forward decl in xxx_python.h where practical

Jelte Jansen 13 years ago
parent
commit
af10f1ef69

+ 2 - 2
src/lib/dns/python/edns_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/edns.h>
-
 namespace isc {
 namespace dns {
+class EDNS;
+
 namespace python {
 
 extern PyTypeObject edns_type;

+ 2 - 2
src/lib/dns/python/message_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/message.h>
-
 namespace isc {
 namespace dns {
+class Message;
+
 namespace python {
 
 extern PyObject* po_MessageTooShort;

+ 2 - 1
src/lib/dns/python/messagerenderer_python.h

@@ -17,11 +17,12 @@
 
 #include <Python.h>
 
-#include <dns/messagerenderer.h>
 #include <util/buffer.h>
 
 namespace isc {
 namespace dns {
+class MessageRenderer;
+
 namespace python {
 
 extern PyTypeObject messagerenderer_type;

+ 2 - 2
src/lib/dns/python/name_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/name.h>
-
 namespace isc {
 namespace dns {
+class Name;
+
 namespace python {
 
 extern PyObject* po_EmptyLabel;

+ 2 - 2
src/lib/dns/python/opcode_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/opcode.h>
-
 namespace isc {
 namespace dns {
+class Opcode;
+
 namespace python {
 
 extern PyTypeObject opcode_type;

+ 3 - 0
src/lib/dns/python/pydnspp.cc

@@ -28,6 +28,9 @@
 #include <Python.h>
 #include <structmember.h>
 
+#include <dns/message.h>
+#include <dns/opcode.h>
+#include <dns/tsig.h>
 #include <util/python/pycppwrapper_util.h>
 
 #include "pydnspp_common.h"

+ 2 - 2
src/lib/dns/python/question_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/question.h>
-
 namespace isc {
 namespace dns {
+class Question;
+
 namespace python {
 
 extern PyObject* po_EmptyQuestion;

+ 2 - 2
src/lib/dns/python/rcode_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/rcode.h>
-
 namespace isc {
 namespace dns {
+class Rcode;
+
 namespace python {
 
 extern PyTypeObject rcode_type;

+ 2 - 2
src/lib/dns/python/rrclass_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/rrclass.h>
-
 namespace isc {
 namespace dns {
+class RRClass;
+
 namespace python {
 
 extern PyObject* po_InvalidRRClass;

+ 2 - 2
src/lib/dns/python/rrttl_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/rrttl.h>
-
 namespace isc {
 namespace dns {
+class RRTTL;
+
 namespace python {
 
 extern PyObject* po_InvalidRRTTL;

+ 2 - 2
src/lib/dns/python/rrtype_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/rrtype.h>
-
 namespace isc {
 namespace dns {
+class RRType;
+
 namespace python {
 
 extern PyObject* po_InvalidRRType;

+ 2 - 2
src/lib/dns/python/tsig_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/tsig.h>
-
 namespace isc {
 namespace dns {
+class TSIGContext;
+
 namespace python {
 
 extern PyTypeObject tsigcontext_type;

+ 2 - 2
src/lib/dns/python/tsigerror_python.h

@@ -17,10 +17,10 @@
 
 #include <Python.h>
 
-#include <dns/tsigerror.h>
-
 namespace isc {
 namespace dns {
+class TSIGError;
+
 namespace python {
 
 extern PyTypeObject tsigerror_type;

+ 3 - 2
src/lib/dns/python/tsigkey_python.h

@@ -17,10 +17,11 @@
 
 #include <Python.h>
 
-#include <dns/tsigkey.h>
-
 namespace isc {
 namespace dns {
+class TSIGKey;
+class TSIGKeyRing;
+
 namespace python {
 
 extern PyTypeObject tsigkey_type;

+ 3 - 2
src/lib/dns/python/tsigrecord_python.h

@@ -17,12 +17,13 @@
 
 #include <Python.h>
 
-#include <dns/tsigrecord.h>
-
 namespace isc {
 namespace dns {
+class TSIGRecord;
+
 namespace python {
 
+
 extern PyTypeObject tsigrecord_type;
 
 /// This is A simple shortcut to create a python TSIGRecord object (in the