diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-11 16:03:50 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-11 17:02:25 -0400 |
commit | dea2aed0b509734ec4e1cd163ac2a4f013000da2 (patch) | |
tree | 7908da76c67ae5172882306a319bf26df81b73b4 /src/pyutils.h | |
parent | d580079df892c30d023b3211d6c4611c17b11f8f (diff) | |
download | fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.gz fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.bz2 fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.zip |
Untabified all source files
Diffstat (limited to 'src/pyutils.h')
-rw-r--r-- | src/pyutils.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pyutils.h b/src/pyutils.h index e0f77003..efb1b858 100644 --- a/src/pyutils.h +++ b/src/pyutils.h @@ -59,8 +59,8 @@ struct register_optional_to_python : public boost::noncopyable static PyObject * convert(const boost::optional<T>& value) { return boost::python::incref - (value ? boost::python::to_python_value<T>()(*value) : - boost::python::detail::none()); + (value ? boost::python::to_python_value<T>()(*value) : + boost::python::detail::none()); } }; @@ -71,30 +71,30 @@ struct register_optional_to_python : public boost::noncopyable using namespace boost::python::converter; if (source == Py_None) - return source; + return source; const registration& converters(registered<T>::converters); if (implicit_rvalue_convertible_from_python(source, converters)) { - rvalue_from_python_stage1_data data = - rvalue_from_python_stage1(source, converters); - return rvalue_from_python_stage2(source, data, converters); + rvalue_from_python_stage1_data data = + rvalue_from_python_stage1(source, converters); + return rvalue_from_python_stage2(source, data, converters); } return NULL; } static void construct(PyObject * source, - boost::python::converter::rvalue_from_python_stage1_data * data) + boost::python::converter::rvalue_from_python_stage1_data * data) { using namespace boost::python::converter; void * const storage = - reinterpret_cast<rvalue_from_python_storage<T> *>(data)->storage.bytes; + reinterpret_cast<rvalue_from_python_storage<T> *>(data)->storage.bytes; - if (data->convertible == source) // == None - new (storage) boost::optional<T>(); // A Boost uninitialized value + if (data->convertible == source) // == None + new (storage) boost::optional<T>(); // A Boost uninitialized value else - new (storage) boost::optional<T>(*reinterpret_cast<T *>(data->convertible)); + new (storage) boost::optional<T>(*reinterpret_cast<T *>(data->convertible)); data->convertible = storage; } |