diff options
-rw-r--r-- | src/utils.cc | 4 | ||||
-rw-r--r-- | src/utils.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/utils.cc b/src/utils.cc index 6cef1a8c..d661f410 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -417,6 +417,8 @@ void report_memory(std::ostream& out, bool report_all) namespace ledger { +#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) + string::string() : std::string() { TRACE_CTOR(string, ""); } @@ -453,6 +455,8 @@ string::~string() throw() { TRACE_DTOR(string); } +#endif // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) + string empty_string(""); strings_list split_arguments(const char * line) diff --git a/src/utils.h b/src/utils.h index 8ddc3c44..f0a165c2 100644 --- a/src/utils.h +++ b/src/utils.h @@ -181,6 +181,8 @@ void report_memory(std::ostream& out, bool report_all = false); namespace ledger { +#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) + class string : public std::string { public: @@ -253,6 +255,12 @@ inline bool operator!=(const char* __lhs, const string& __rhs) inline bool operator!=(const string& __lhs, const char* __rhs) { return __lhs.compare(__rhs) != 0; } +#else // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) + +typedef std::string string; + +#endif // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON) + extern string empty_string; strings_list split_arguments(const char * line); |