From 07c31b932078544205d61551edd4a66f69be30ae Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 2 Dec 2015 11:25:59 +0100
Subject: Avoid unnecessary include in header

---
 include/astra/PluginAlgorithm.h | 9 ++++++---
 src/PluginAlgorithm.cpp         | 6 +++++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/include/astra/PluginAlgorithm.h b/include/astra/PluginAlgorithm.h
index b56228e..667e813 100644
--- a/include/astra/PluginAlgorithm.h
+++ b/include/astra/PluginAlgorithm.h
@@ -31,13 +31,16 @@ $Id$
 
 #ifdef ASTRA_PYTHON
 
-#include <Python.h>
-#include "bytesobject.h"
 #include "astra/Algorithm.h"
 #include "astra/Singleton.h"
 #include "astra/XMLDocument.h"
 #include "astra/XMLNode.h"
 
+// Slightly hackish forward declaration of PyObject
+struct _object;
+typedef _object PyObject;
+
+
 namespace astra {
 class _AstraExport CPluginAlgorithm : public CAlgorithm {
 
@@ -84,4 +87,4 @@ PyObject* XMLNode2dict(XMLNode node);
 
 #endif
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/PluginAlgorithm.cpp b/src/PluginAlgorithm.cpp
index e79c77b..8f7dfc5 100644
--- a/src/PluginAlgorithm.cpp
+++ b/src/PluginAlgorithm.cpp
@@ -37,9 +37,13 @@ $Id$
 #include <fstream>
 #include <string>
 
+#include <Python.h>
+#include "bytesobject.h"
+
 namespace astra {
 
 
+
 void logPythonError(){
     if(PyErr_Occurred()){
         PyObject *ptype, *pvalue, *ptraceback;
@@ -394,4 +398,4 @@ PyObject* XMLNode2dict(XMLNode node){
 }
 
 }
-#endif
\ No newline at end of file
+#endif
-- 
cgit v1.2.3