summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-03 12:21:54 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-03 12:22:10 -0400
commit3434650848e500d605447388ef7e069ee1515b72 (patch)
treeda05e1bc5dbf5ef321d258f524518e9631dc7574 /python
parent9bdcbffb150387d64e7eff630aaad84fb0d696b1 (diff)
downloadfork-ledger-3434650848e500d605447388ef7e069ee1515b72.tar.gz
fork-ledger-3434650848e500d605447388ef7e069ee1515b72.tar.bz2
fork-ledger-3434650848e500d605447388ef7e069ee1515b72.zip
Removed the binary caching code, and the XML, QIF and Gnucash parsers.
Diffstat (limited to 'python')
-rw-r--r--python/py_amount.cc41
-rw-r--r--python/py_value.cc18
2 files changed, 0 insertions, 59 deletions
diff --git a/python/py_amount.cc b/python/py_amount.cc
index 2528f779..26107ce3 100644
--- a/python/py_amount.cc
+++ b/python/py_amount.cc
@@ -84,39 +84,6 @@ void py_print(amount_t& amount, object out) {
}
}
-void py_read_1(amount_t& amount, object in) {
- if (PyFile_Check(in.ptr())) {
- pyifstream instr(reinterpret_cast<PyFileObject *>(in.ptr()));
- amount.read(instr);
- } else {
- PyErr_SetString(PyExc_IOError,
- "Argument to amount.read(file) is not a file object");
- }
-}
-void py_read_2(amount_t& amount, const std::string& str) {
- const char * p = str.c_str();
- amount.read(p);
-}
-
-void py_write_xml_1(amount_t& amount, object out) {
- if (PyFile_Check(out.ptr())) {
- pyofstream outstr(reinterpret_cast<PyFileObject *>(out.ptr()));
- amount.write_xml(outstr);
- } else {
- PyErr_SetString(PyExc_IOError,
- "Argument to amount.write_xml(file) is not a file object");
- }
-}
- void py_write_xml_2(amount_t& amount, object out, const int depth) {
- if (PyFile_Check(out.ptr())) {
- pyofstream outstr(reinterpret_cast<PyFileObject *>(out.ptr()));
- amount.write_xml(outstr, depth);
- } else {
- PyErr_SetString(PyExc_IOError,
- "Argument to amount.write_xml(file, depth) is not a file object");
- }
-}
-
#define EXC_TRANSLATOR(type) \
void exc_translate_ ## type(const type& err) { \
PyErr_SetString(PyExc_ArithmeticError, err.what()); \
@@ -338,14 +305,6 @@ internal precision.")
.def("print_", py_print)
- .def("read", py_read_1)
- .def("read", py_read_2)
- .def("write", &amount_t::write)
-
- .def("read_xml", &amount_t::read_xml)
- .def("write_xml", py_write_xml_1)
- .def("write_xml", py_write_xml_2)
-
.def("dump", &amount_t::dump)
.def("valid", &amount_t::valid)
diff --git a/python/py_value.cc b/python/py_value.cc
index 4556c31e..034d3f8f 100644
--- a/python/py_value.cc
+++ b/python/py_value.cc
@@ -58,20 +58,6 @@ void py_set_string(value_t& amount, const string& str) {
return amount.set_string(str);
}
-void py_read_1(value_t& amount, object in) {
- if (PyFile_Check(in.ptr())) {
- pyifstream instr(reinterpret_cast<PyFileObject *>(in.ptr()));
- amount.read(instr);
- } else {
- PyErr_SetString(PyExc_IOError,
- "Argument to amount.parse(file) is not a file object");
- }
-}
-void py_read_2(value_t& amount, const std::string& str) {
- const char * p = str.c_str();
- amount.read(p);
-}
-
#define EXC_TRANSLATOR(type) \
void exc_translate_ ## type(const type& err) { \
PyErr_SetString(PyExc_ArithmeticError, err.what()); \
@@ -278,10 +264,6 @@ void export_value()
.def("dump", &value_t::dump)
.def("print", &value_t::print)
- .def("read", py_read_1)
- .def("read", py_read_2)
- .def("write", &value_t::write)
-
.def("valid", &value_t::valid)
;