summaryrefslogtreecommitdiff
path: root/parser.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-02-15 20:10:49 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:21 -0400
commitce3491c99f089874725999ca6d8b1fb6a15c9e5e (patch)
treec48a2bf19a954c8103a02e26f9a1a490b8095268 /parser.cc
parent2eafddc91b8d7f0b7bdfd991acdc9e0b2295e304 (diff)
downloadfork-ledger-ce3491c99f089874725999ca6d8b1fb6a15c9e5e.tar.gz
fork-ledger-ce3491c99f089874725999ca6d8b1fb6a15c9e5e.tar.bz2
fork-ledger-ce3491c99f089874725999ca6d8b1fb6a15c9e5e.zip
Removed Python integration support.
Diffstat (limited to 'parser.cc')
-rw-r--r--parser.cc48
1 files changed, 0 insertions, 48 deletions
diff --git a/parser.cc b/parser.cc
index 6d589bf8..cdb3a810 100644
--- a/parser.cc
+++ b/parser.cc
@@ -191,51 +191,3 @@ unsigned int parse_ledger_data(journal_t * journal, config_t& config)
}
} // namespace ledger
-
-#ifdef USE_BOOST_PYTHON
-
-#include <boost/python.hpp>
-#include <Python.h>
-
-using namespace boost::python;
-using namespace ledger;
-
-struct parser_wrap : public parser_t
-{
- PyObject * self;
- parser_wrap(PyObject * self_) : self(self_) {}
-
- virtual bool test(std::istream& in) const {
- return call_method<bool>(self, "test", in);
- }
-
- virtual unsigned int parse(std::istream& in,
- journal_t * journal,
- account_t * master = NULL,
- const std::string * original_file = NULL) {
- return call_method<unsigned int>(self, "__call__", in, journal, master,
- original_file);
- }
-};
-
-BOOST_PYTHON_FUNCTION_OVERLOADS(parse_journal_overloads, parse_journal, 2, 4)
-BOOST_PYTHON_FUNCTION_OVERLOADS(parse_journal_file_overloads,
- parse_journal_file, 2, 4)
-
-BOOST_PYTHON_FUNCTION_OVERLOADS(parse_ledger_data_overloads,
- parse_ledger_data, 1, 2)
-
-void export_parser() {
- class_< parser_t, parser_wrap, boost::noncopyable > ("Parser")
- ;
-
- def("register_parser", register_parser);
- def("unregister_parser", unregister_parser);
- def("parse_journal", parse_journal, parse_journal_overloads());
- def("parse_journal_file", parse_journal_file, parse_journal_file_overloads());
-#if 0
- def("parse_ledger_data", parse_ledger_data, parse_ledger_data_overloads());
-#endif
-}
-
-#endif // USE_BOOST_PYTHON