diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-03 04:34:50 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:40:47 -0400 |
commit | a32173ace60df5a1e9414f5e95b556c436f62718 (patch) | |
tree | fff5b881c657fddb8543b0f787bfa75cf009a0b7 /python.cc | |
parent | cc98b59d1e99238270eb307b117da8b0b35e6f27 (diff) | |
download | fork-ledger-a32173ace60df5a1e9414f5e95b556c436f62718.tar.gz fork-ledger-a32173ace60df5a1e9414f5e95b556c436f62718.tar.bz2 fork-ledger-a32173ace60df5a1e9414f5e95b556c436f62718.zip |
changes
Diffstat (limited to 'python.cc')
-rw-r--r-- | python.cc | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/python.cc b/python.cc deleted file mode 100644 index 78f98d5d..00000000 --- a/python.cc +++ /dev/null @@ -1,81 +0,0 @@ -#include "python.h" -#include "journal.h" -#include "acconf.h" - -#include <boost/python.hpp> - -using namespace boost::python; - -namespace { - bool python_initialized = false; - bool module_initialized = false; -} - -void export_amount(); -void export_balance(); -void export_value(); -void export_journal(); -void export_parser(); -void export_textual(); -void export_binary(); -void export_qif(); -#ifdef READ_GNUCASH -void export_gnucash(); -#endif -void export_option(); -void export_config(); -void export_walk(); -void export_format(); -void export_valexpr(); -void export_datetime(); -void export_derive(); - -void initialize_ledger_for_python() -{ - export_amount(); - export_balance(); - export_value(); - export_journal(); - export_parser(); - export_textual(); - export_binary(); - export_qif(); -#ifdef READ_GNUCASH - export_gnucash(); -#endif - export_option(); - export_config(); - export_walk(); - export_format(); - export_valexpr(); - export_datetime(); - export_derive(); - - module_initialized = true; -} - -namespace ledger { - -python_support * python_interpretor = NULL; - -static struct cleanup_python { - ~cleanup_python() { - if (python_initialized) - Py_Finalize(); - if (python_interpretor) - delete python_interpretor; - } -} _cleanup; - -void init_python() -{ - if (! module_initialized) { - Py_Initialize(); - python_initialized = true; - detail::init_module("ledger", &initialize_ledger_for_python); - } - - python_interpretor = new python_support; -} - -} // namespace ledger |