From f94b331787d71fbf9fa1b1084a52a2b1c79903d9 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 11 Feb 2012 16:12:26 +0100 Subject: [PATCH] Port to pqxx3, where we need the widestring traits available at parse time. --- bigscreen/widestring.cpp | 11 ----------- bigscreen/widestring.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bigscreen/widestring.cpp b/bigscreen/widestring.cpp index a0d781a..2411836 100644 --- a/bigscreen/widestring.cpp +++ b/bigscreen/widestring.cpp @@ -66,14 +66,3 @@ void widestring::operator= (const char *from) free(from_buf); delete[] to_buf; } - -namespace pqxx -{ - -template<> -void from_string(const char *from, widestring &to) -{ - to = from; -} - -} diff --git a/bigscreen/widestring.h b/bigscreen/widestring.h index 67ffdbb..86113ff 100644 --- a/bigscreen/widestring.h +++ b/bigscreen/widestring.h @@ -2,6 +2,7 @@ #define _WIDESTRING_H 1 #include +#include "pqxx/util.hxx" // UCS-4 string with support for getting from UTF-8 class widestring : public std::wstring @@ -14,4 +15,15 @@ public: void operator= (const char *from); }; +namespace pqxx +{ + +template<> +inline void from_string(const char *from, widestring &to) +{ + to = from; +} + +} + #endif /* !defined(_WIDESTRING_H) */ -- 2.39.2