diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pyutils.h | 2 | ||||
-rw-r--r-- | src/utils.cc | 4 | ||||
-rw-r--r-- | src/utils.h | 8 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/pyutils.h b/src/pyutils.h index 44bb6d90..2c7dfaeb 100644 --- a/src/pyutils.h +++ b/src/pyutils.h @@ -180,7 +180,9 @@ namespace boost { namespace python { BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T,expr, pytype) \ BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE(T,expr) +#if !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) BOOST_PYTHON_TO_PYTHON_BY_VALUE(ledger::string, ::PyUnicode_FromEncodedObject(::PyString_FromString(x.c_str()), "UTF-8", NULL), &PyUnicode_Type) +#endif } } // namespace boost::python diff --git a/src/utils.cc b/src/utils.cc index 17118904..ada6b600 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -489,7 +489,7 @@ void report_memory(std::ostream& out, bool report_all) namespace ledger { -#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) +#if !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) string::string() : std::string() { TRACE_CTOR(string, ""); @@ -527,7 +527,7 @@ string::~string() throw() { TRACE_DTOR(string); } -#endif // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) +#endif // !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) string empty_string(""); diff --git a/src/utils.h b/src/utils.h index 8f11f75a..34011e3f 100644 --- a/src/utils.h +++ b/src/utils.h @@ -72,7 +72,7 @@ namespace ledger { using namespace boost; -#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) +#if !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) class string; #else typedef std::string string; @@ -93,7 +93,7 @@ namespace ledger { } #if BOOST_FILESYSTEM_VERSION == 3 -#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) +#if !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) namespace boost { namespace filesystem3 { namespace path_traits { template<> struct is_pathable<ledger::string> { static const bool value = true; }; }}} @@ -193,7 +193,7 @@ void report_memory(std::ostream& out, bool report_all = false); namespace ledger { -#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) +#if !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) class string : public std::string { @@ -272,7 +272,7 @@ inline bool operator!=(const char* __lhs, const string& __rhs) inline bool operator!=(const string& __lhs, const char* __rhs) { return __lhs.compare(__rhs) != 0; } -#endif // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) +#endif // !defined(HAVE_CPP11) && (defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)) extern string empty_string; |