diff --git a/triqs/arrays/storages/mem_block.hpp b/triqs/arrays/storages/mem_block.hpp index 75ba6832..29266a3d 100644 --- a/triqs/arrays/storages/mem_block.hpp +++ b/triqs/arrays/storages/mem_block.hpp @@ -21,8 +21,16 @@ #ifndef TRIQS_MEM_BLOCK_H #define TRIQS_MEM_BLOCK_H #include "../../utility/exceptions.hpp" + +#ifdef TRIQS_WITH_PYTHON_SUPPORT #include #include +#else +// if no python, same code but remove python parts... +typedef void PyObject; +#define Py_DECREF(P) +#endif + #include "./memcopy.hpp" #include @@ -34,11 +42,6 @@ #define TRACE_MEM_DEBUG(X) #endif -// if no python, same code but remove python parts... -#ifndef TRIQS_WITH_PYTHON_SUPPORT -typedef void PyObject; -#define Py_DECREF(P) -#endif namespace triqs { namespace arrays { namespace storages { //namespace details {