diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-07 02:53:10 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-07 02:53:35 -0400 |
commit | 0eda1ad2c6db874a6fed9c45851d4222250a2255 (patch) | |
tree | b9e784574e417bd2f5d52b0c3895589d012149f7 /python/py_times.cc | |
parent | 6ddc21dc5fe75c80df1bf383e5bfc2320deb8624 (diff) | |
download | fork-ledger-0eda1ad2c6db874a6fed9c45851d4222250a2255.tar.gz fork-ledger-0eda1ad2c6db874a6fed9c45851d4222250a2255.tar.bz2 fork-ledger-0eda1ad2c6db874a6fed9c45851d4222250a2255.zip |
The Python interface layer is building again.
Diffstat (limited to 'python/py_times.cc')
-rw-r--r-- | python/py_times.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/py_times.cc b/python/py_times.cc index 00108b04..2d7ce662 100644 --- a/python/py_times.cc +++ b/python/py_times.cc @@ -83,11 +83,11 @@ typedef register_python_conversion<date, date_to_python, date_from_python> struct datetime_to_python { - static PyObject* convert(const moment_t& moment) + static PyObject* convert(const datetime_t& moment) { PyDateTime_IMPORT; date dte = moment.date(); - moment_t::time_duration_type tod = moment.time_of_day(); + datetime_t::time_duration_type tod = moment.time_of_day(); return PyDateTime_FromDateAndTime(dte.year(), dte.month(), dte.day(), tod.hours(), tod.minutes(), tod.seconds(), tod.total_microseconds() % 1000000); @@ -112,13 +112,13 @@ struct datetime_from_python int h = PyDateTime_DATE_GET_HOUR(obj_ptr); int min = PyDateTime_DATE_GET_MINUTE(obj_ptr); int s = PyDateTime_DATE_GET_SECOND(obj_ptr); - moment_t* moment = new moment_t(date(y,m,d), - moment_t::time_duration_type(h, min, s)); + datetime_t* moment = new datetime_t(date(y,m,d), + datetime_t::time_duration_type(h, min, s)); data->convertible = (void*)moment; } }; -typedef register_python_conversion<moment_t, datetime_to_python, datetime_from_python> +typedef register_python_conversion<datetime_t, datetime_to_python, datetime_from_python> datetime_python_conversion; void export_times() @@ -126,7 +126,7 @@ void export_times() date_python_conversion(); datetime_python_conversion(); - register_optional_to_python<moment_t>(); + register_optional_to_python<datetime_t>(); } } // namespace ledger |