Base: use forward declaration instead of including Python.h

This commit is contained in:
wmayer
2022-03-03 19:18:07 +01:00
parent dc1f35804d
commit 6ff1ccb140
6 changed files with 19 additions and 5 deletions

View File

@@ -34,8 +34,8 @@
#include "Console.h"
#include "Exception.h"
#include "frameobject.h"
#include "PyObjectBase.h"
#include "frameobject.h"
#include <QCoreApplication>

View File

@@ -21,18 +21,24 @@
* *
***************************************************************************/
#pragma once
#ifndef BASE_CONSOLE_H
#define BASE_CONSOLE_H
// Std. configurations
#include <Base/PyExport.h>
#include <Base/Stream.h>
//#pragma warning(disable: 4786) // specifier longer then 255 chars
#include <chrono>
#include <map>
#include <set>
#include <string>
#include <sstream>
// Python stuff
typedef struct _object PyObject;
typedef struct PyMethodDef PyMethodDef;
//FIXME: ISO C++11 requires at least one argument for the "..." in a variadic macro
#if defined(__clang__)
# pragma clang diagnostic push
@@ -747,3 +753,5 @@ private:
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#endif // BASE_CONSOLE_H

View File

@@ -26,6 +26,7 @@
#define BASE_OBSERVER_H
#include <cassert>
#include <cstring>
#include <set>
#include "Console.h"
#include "Exception.h"

View File

@@ -32,6 +32,9 @@
#ifndef BASE__PARAMETER_H
#define BASE__PARAMETER_H
// Python stuff
typedef struct _object PyObject;
#ifdef FC_OS_MACOSX
#undef toupper
#undef tolower

View File

@@ -26,6 +26,7 @@
# include <unistd.h>
#endif
#include <CXX/WrapPython.h>
#include <memory>
#include <QString>
#include "Exception.h"

View File

@@ -24,12 +24,13 @@
#ifndef BASE_UNITSAPI_H
#define BASE_UNITSAPI_H
#include <CXX/WrapPython.h>
#include <memory>
#include <QString>
#include "UnitsSchema.h"
#include "Quantity.h"
typedef struct _object PyObject;
typedef struct PyMethodDef PyMethodDef;
namespace Base {
typedef std::unique_ptr<UnitsSchema> UnitsSchemaPtr;