diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 20:33:40 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 21:53:11 +0200 |
commit | 9244a27f9548a1d39fb01348fde66ff81f5150a4 (patch) | |
tree | 0f9d06a762a9a9939e1f37be60cf2b5e47da7983 /src/py_times.cc | |
parent | 5f78556078d2e61d5c0ef44e36d58f3864cd84d1 (diff) | |
download | fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.tar.gz fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.tar.bz2 fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.zip |
Refactor python related types into ledger::python namespace
Diffstat (limited to 'src/py_times.cc')
-rw-r--r-- | src/py_times.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/py_times.cc b/src/py_times.cc index 79bacad7..d2afb5c8 100644 --- a/src/py_times.cc +++ b/src/py_times.cc @@ -40,6 +40,7 @@ namespace ledger { +using namespace python; using namespace boost::python; struct date_to_python @@ -81,7 +82,6 @@ struct date_from_python typedef register_python_conversion<date_t, date_to_python, date_from_python> date_python_conversion; - struct datetime_to_python { static PyObject* convert(const datetime_t& moment) @@ -145,7 +145,6 @@ typedef register_python_conversion<datetime_t, datetime_to_python, datetime_from_python> datetime_python_conversion; - /* Convert time_duration to/from python */ struct duration_to_python { @@ -185,7 +184,7 @@ struct duration_from_python } static void construct(PyObject* obj_ptr, - python::converter::rvalue_from_python_stage1_data * data) + converter::rvalue_from_python_stage1_data * data) { PyDateTime_Delta const* pydelta = reinterpret_cast<PyDateTime_Delta*>(obj_ptr); @@ -217,7 +216,6 @@ typedef register_python_conversion<time_duration_t, duration_to_python, duration_from_python> duration_python_conversion; - datetime_t py_parse_datetime(const string& str) { return parse_datetime(str); } |