diff --git a/src/api.c b/src/api.c index 233a510..4296b80 100644 --- a/src/api.c +++ b/src/api.c @@ -30,11 +30,14 @@ #include "line_info.h" #include "message_queue.h" #include "misc_tools.h" -#include "python_api.h" #include "settings.h" #include "toxic_strings.h" #include "windows.h" +#ifdef PYTHON +#include "python_api.h" +#endif /* PYTHON */ + Tox *user_tox; static WINDOW *cur_window; static ToxWindow *self_window; diff --git a/src/help.c b/src/help.c index 3023998..6c36f86 100644 --- a/src/help.c +++ b/src/help.c @@ -26,7 +26,10 @@ #include "toxic.h" #include "help.h" #include "misc_tools.h" + +#ifdef PYTHON #include "api.h" +#endif /* PYTHON */ #ifdef PYTHON #define HELP_MENU_HEIGHT 10 diff --git a/src/python_api.c b/src/python_api.c index cc35fbe..65dba3e 100644 --- a/src/python_api.c +++ b/src/python_api.c @@ -20,9 +20,11 @@ * */ +#ifdef PYTHON #include - #include "api.h" +#endif /* PYTHON */ + #include "execute.h" extern Tox *user_tox; diff --git a/src/python_api.h b/src/python_api.h index c9ff4c7..3f41e8c 100644 --- a/src/python_api.h +++ b/src/python_api.h @@ -23,7 +23,9 @@ #ifndef PYTHON_API_H #define PYTHON_API_H +#ifdef PYTHON #include +#endif /* PYTHON */ PyMODINIT_FUNC PyInit_toxic_api(void); void terminate_python(void);