summaryrefslogtreecommitdiff
path: root/session.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-27 10:09:00 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:32 -0400
commitd0e9822ed16cb36de4cb1171a89d4049c615f1a0 (patch)
treefa48eba60a56dee5bcf1ebd266d822c5a96e4323 /session.cc
parent0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (diff)
downloadfork-ledger-d0e9822ed16cb36de4cb1171a89d4049c615f1a0.tar.gz
fork-ledger-d0e9822ed16cb36de4cb1171a89d4049c615f1a0.tar.bz2
fork-ledger-d0e9822ed16cb36de4cb1171a89d4049c615f1a0.zip
Moved around the Python code.
Diffstat (limited to 'session.cc')
-rw-r--r--session.cc49
1 files changed, 6 insertions, 43 deletions
diff --git a/session.cc b/session.cc
index 6d6215e8..25d040ff 100644
--- a/session.cc
+++ b/session.cc
@@ -1,4 +1,7 @@
#include "session.h"
+#if defined(USE_BOOST_PYTHON)
+#include "py_eval.h"
+#endif
namespace ledger {
@@ -194,50 +197,10 @@ void initialize()
void shutdown()
{
+#if defined(USE_BOOST_PYTHON)
+ shutdown_for_python();
+#endif
amount_t::shutdown();
}
} // namespace ledger
-
-#if 0
-#ifdef USE_BOOST_PYTHON
-
-using namespace boost::python;
-using namespace ledger;
-
-void export_session()
-{
- class_< session_t > ("Session")
- .def_readwrite("init_file", &session_t::init_file)
- .def_readwrite("data_file", &session_t::data_file)
- .def_readwrite("cache_file", &session_t::cache_file)
- .def_readwrite("price_db", &session_t::price_db)
-
- .def_readwrite("balance_format", &session_t::balance_format)
- .def_readwrite("register_format", &session_t::register_format)
- .def_readwrite("wide_register_format", &session_t::wide_register_format)
- .def_readwrite("plot_amount_format", &session_t::plot_amount_format)
- .def_readwrite("plot_total_format", &session_t::plot_total_format)
- .def_readwrite("print_format", &session_t::print_format)
- .def_readwrite("write_hdr_format", &session_t::write_hdr_format)
- .def_readwrite("write_xact_format", &session_t::write_xact_format)
- .def_readwrite("equity_format", &session_t::equity_format)
- .def_readwrite("prices_format", &session_t::prices_format)
- .def_readwrite("pricesdb_format", &session_t::pricesdb_format)
-
- .def_readwrite("pricing_leeway", &session_t::pricing_leeway)
-
- .def_readwrite("download_quotes", &session_t::download_quotes)
- .def_readwrite("use_cache", &session_t::use_cache)
- .def_readwrite("cache_dirty", &session_t::cache_dirty)
- .def_readwrite("debug_mode", &session_t::debug_mode)
- .def_readwrite("verbose_mode", &session_t::verbose_mode)
- .def_readwrite("trace_alloc_mode", &session_t::trace_alloc_mode)
- .def_readwrite("trace_class_mode", &session_t::trace_class_mode)
-
- .def_readwrite("journals", &session_t::journals)
- ;
-}
-
-#endif // USE_BOOST_PYTHON
-#endif