summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-08 19:05:06 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-08 19:05:06 -0400
commite0035021931f2b645c9d107c1be6636d3b6aa544 (patch)
treea8a3cd709e29b3133f531f16dbe208f2a19cc347
parent769b4ba1d0a913b23d5bb8084c0f63cbfad4625a (diff)
downloadfork-ledger-e0035021931f2b645c9d107c1be6636d3b6aa544.tar.gz
fork-ledger-e0035021931f2b645c9d107c1be6636d3b6aa544.tar.bz2
fork-ledger-e0035021931f2b645c9d107c1be6636d3b6aa544.zip
Moved several #includes to facilitate the use of pre-compiled headers.
-rw-r--r--python/py_chain.cc4
-rw-r--r--python/py_commodity.cc3
-rw-r--r--python/py_entry.cc4
-rw-r--r--python/py_flags.cc4
-rw-r--r--python/py_format.cc4
-rw-r--r--python/py_global.cc4
-rw-r--r--python/py_item.cc4
-rw-r--r--python/py_journal.cc4
-rw-r--r--python/py_report.cc4
-rw-r--r--python/py_scope.cc4
-rw-r--r--python/py_session.cc4
-rw-r--r--python/py_timelog.cc4
-rw-r--r--python/py_times.cc2
-rw-r--r--python/py_utils.cc4
-rw-r--r--python/py_value.cc4
-rw-r--r--python/py_xact.cc4
-rw-r--r--python/pyinterp.cc2
-rw-r--r--python/pyinterp.h3
-rw-r--r--src/format.h5
-rw-r--r--src/stream.cc6
-rw-r--r--src/system.hh27
21 files changed, 27 insertions, 77 deletions
diff --git a/python/py_chain.cc b/python/py_chain.cc
index adfa6423..279d4375 100644
--- a/python/py_chain.cc
+++ b/python/py_chain.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "chain.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_commodity.cc b/python/py_commodity.cc
index d29ec83d..7b101ec1 100644
--- a/python/py_commodity.cc
+++ b/python/py_commodity.cc
@@ -33,9 +33,6 @@
#include "pyutils.h"
#include "amount.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_entry.cc b/python/py_entry.cc
index d72f6363..8743886e 100644
--- a/python/py_entry.cc
+++ b/python/py_entry.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "entry.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_flags.cc b/python/py_flags.cc
index 0fe794f7..440c81c6 100644
--- a/python/py_flags.cc
+++ b/python/py_flags.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "flags.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_format.cc b/python/py_format.cc
index 632d0e74..2880cf3e 100644
--- a/python/py_format.cc
+++ b/python/py_format.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "format.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_global.cc b/python/py_global.cc
index 1037e8a5..c064f9d8 100644
--- a/python/py_global.cc
+++ b/python/py_global.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "global.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_item.cc b/python/py_item.cc
index 3007fa63..f0e3f440 100644
--- a/python/py_item.cc
+++ b/python/py_item.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "item.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_journal.cc b/python/py_journal.cc
index e9832a16..7f8d76c6 100644
--- a/python/py_journal.cc
+++ b/python/py_journal.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "journal.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_report.cc b/python/py_report.cc
index 3fbb142b..1a42b1d7 100644
--- a/python/py_report.cc
+++ b/python/py_report.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "report.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_scope.cc b/python/py_scope.cc
index 4ca76845..e4eef37d 100644
--- a/python/py_scope.cc
+++ b/python/py_scope.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "scope.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_session.cc b/python/py_session.cc
index 3468a4e7..108dcc3c 100644
--- a/python/py_session.cc
+++ b/python/py_session.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "session.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_timelog.cc b/python/py_timelog.cc
index febc6fee..127bf641 100644
--- a/python/py_timelog.cc
+++ b/python/py_timelog.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "timelog.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_times.cc b/python/py_times.cc
index dfd1769d..f209929a 100644
--- a/python/py_times.cc
+++ b/python/py_times.cc
@@ -32,8 +32,6 @@
#include "pyinterp.h"
#include "pyutils.h"
-#include <datetime.h>
-
// jww (2007-05-04): Convert time duration objects to PyDelta
namespace ledger {
diff --git a/python/py_utils.cc b/python/py_utils.cc
index d1963852..ac1ed822 100644
--- a/python/py_utils.cc
+++ b/python/py_utils.cc
@@ -32,10 +32,6 @@
#include "pyinterp.h"
#include "pyutils.h"
-#include <boost/python/module.hpp>
-#include <boost/python/def.hpp>
-#include <boost/python/to_python_converter.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_value.cc b/python/py_value.cc
index 6c8c232f..f4fe11bc 100644
--- a/python/py_value.cc
+++ b/python/py_value.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "value.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/py_xact.cc b/python/py_xact.cc
index 85c55151..fb5dbf8e 100644
--- a/python/py_xact.cc
+++ b/python/py_xact.cc
@@ -33,10 +33,6 @@
#include "pyutils.h"
#include "xact.h"
-#include <boost/python/exception_translator.hpp>
-#include <boost/python/implicit.hpp>
-#include <boost/python/args.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/pyinterp.cc b/python/pyinterp.cc
index f2f712d9..3648cdf4 100644
--- a/python/pyinterp.cc
+++ b/python/pyinterp.cc
@@ -31,8 +31,6 @@
#include "pyinterp.h"
-#include <boost/python/module_init.hpp>
-
namespace ledger {
using namespace boost::python;
diff --git a/python/pyinterp.h b/python/pyinterp.h
index de910223..7303644c 100644
--- a/python/pyinterp.h
+++ b/python/pyinterp.h
@@ -37,9 +37,6 @@
#if defined(HAVE_BOOST_PYTHON)
-#include <boost/python.hpp>
-#include <Python.h>
-
namespace ledger {
class python_interpreter_t : public session_t
diff --git a/src/format.h b/src/format.h
index 66c226b2..5c0de527 100644
--- a/src/format.h
+++ b/src/format.h
@@ -46,13 +46,8 @@
#ifndef _FORMAT_H
#define _FORMAT_H
-#define SUPPORT_UNICODE 1
-
#include "journal.h"
#include "expr.h"
-#if defined(SUPPORT_UNICODE)
-#include "utf8.h"
-#endif
namespace ledger {
diff --git a/src/stream.cc b/src/stream.cc
index 94282d2d..403e579e 100644
--- a/src/stream.cc
+++ b/src/stream.cc
@@ -31,12 +31,6 @@
#include "utils.h"
-#ifdef HAVE_UNIX_PIPES
-#include <sys/types.h>
-#include <sys/wait.h>
-#include "fdstream.h"
-#endif
-
namespace ledger {
namespace {
diff --git a/src/system.hh b/src/system.hh
index d56a1896..fdec99fe 100644
--- a/src/system.hh
+++ b/src/system.hh
@@ -129,9 +129,19 @@ typedef std::ostream::pos_type ostream_pos_type;
#include <pwd.h>
#endif
+#ifdef HAVE_UNIX_PIPES
+#include <sys/types.h>
+#include <sys/wait.h>
+#include "fdstream.h"
+#endif
+
#include <gmp.h>
#include <mpfr.h>
#include "sha1.h"
+#define SUPPORT_UNICODE 1
+#if defined(SUPPORT_UNICODE)
+#include "utf8.h"
+#endif
#ifdef HAVE_LIBEDIT
#include <editline/readline.h>
@@ -159,4 +169,21 @@ typedef std::ostream::pos_type ostream_pos_type;
#include <boost/regex.hpp>
#include <boost/variant.hpp>
+#if defined(HAVE_BOOST_PYTHON)
+
+#include <boost/python.hpp>
+
+#include <Python.h>
+#include <datetime.h>
+
+#include <boost/python/exception_translator.hpp>
+#include <boost/python/implicit.hpp>
+#include <boost/python/args.hpp>
+#include <boost/python/module.hpp>
+#include <boost/python/def.hpp>
+#include <boost/python/to_python_converter.hpp>
+#include <boost/python/module_init.hpp>
+
+#endif // HAVE_BOOST_PYTHON
+
#endif // _SYSTEM_HH