Skip to content

Commit

Permalink
Only include python libs when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman committed Jun 6, 2017
1 parent 56a9571 commit 922c184
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/python_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
*
*/

#ifdef PYTHON
#include <Python.h>

#include "api.h"
#endif /* PYTHON */

#include "execute.h"

extern Tox *user_tox;
Expand Down
2 changes: 2 additions & 0 deletions src/python_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#ifndef PYTHON_API_H
#define PYTHON_API_H

#ifdef PYTHON
#include <Python.h>
#endif /* PYTHON */

PyMODINIT_FUNC PyInit_toxic_api(void);
void terminate_python(void);
Expand Down

0 comments on commit 922c184

Please sign in to comment.