From dea2aed0b509734ec4e1cd163ac2a4f013000da2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 11 Jun 2010 16:03:50 -0400 Subject: Untabified all source files --- src/py_times.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/py_times.cc') diff --git a/src/py_times.cc b/src/py_times.cc index 39b0df7a..c2e0b8f8 100644 --- a/src/py_times.cc +++ b/src/py_times.cc @@ -41,10 +41,10 @@ namespace ledger { using namespace boost::python; -#define MY_PyDateTime_IMPORT \ - PyDateTimeAPI = (PyDateTime_CAPI*) \ - PyCObject_Import(const_cast("datetime"), \ - const_cast("datetime_CAPI")) +#define MY_PyDateTime_IMPORT \ + PyDateTimeAPI = (PyDateTime_CAPI*) \ + PyCObject_Import(const_cast("datetime"), \ + const_cast("datetime_CAPI")) struct date_to_python { @@ -65,7 +65,7 @@ struct date_from_python } static void construct(PyObject * obj_ptr, - converter::rvalue_from_python_stage1_data * data) + converter::rvalue_from_python_stage1_data * data) { MY_PyDateTime_IMPORT; @@ -113,7 +113,7 @@ struct datetime_from_python } static void construct(PyObject * obj_ptr, - converter::rvalue_from_python_stage1_data * data) + converter::rvalue_from_python_stage1_data * data) { MY_PyDateTime_IMPORT; @@ -139,14 +139,14 @@ struct datetime_from_python datetime_t * moment = new datetime_t(date_t(y, m, d), - datetime_t::time_duration_type(h, min, s, ms)); + datetime_t::time_duration_type(h, min, s, ms)); data->convertible = (void *) moment; } }; typedef register_python_conversion + datetime_to_python, datetime_from_python> datetime_python_conversion; @@ -189,7 +189,7 @@ struct duration_from_python } static void construct(PyObject* obj_ptr, - python::converter::rvalue_from_python_stage1_data * data) + python::converter::rvalue_from_python_stage1_data * data) { PyDateTime_Delta const* pydelta = reinterpret_cast(obj_ptr); @@ -202,8 +202,8 @@ struct duration_from_python // Create time duration object posix_time::time_duration duration = (posix_time::hours(24) * days + - posix_time::seconds(pydelta->seconds) + - posix_time::microseconds(pydelta->microseconds)); + posix_time::seconds(pydelta->seconds) + + posix_time::microseconds(pydelta->microseconds)); if (is_negative) duration = duration.invert_sign(); @@ -218,7 +218,7 @@ struct duration_from_python }; typedef register_python_conversion + duration_to_python, duration_from_python> duration_python_conversion; @@ -240,7 +240,7 @@ void export_times() register_optional_to_python(); scope().attr("parse_datetime") = &py_parse_datetime; - scope().attr("parse_date") = &py_parse_date; + scope().attr("parse_date") = &py_parse_date; scope().attr("times_initialize") = ×_initialize; scope().attr("times_shutdown") = ×_shutdown; -- cgit v1.2.3