]> git.sesse.net Git - ccbs/commitdiff
Port to pqxx3, where we need the widestring traits available at parse time.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 11 Feb 2012 15:12:26 +0000 (16:12 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 11 Feb 2012 15:12:26 +0000 (16:12 +0100)
bigscreen/widestring.cpp
bigscreen/widestring.h

index a0d781a4edf5d22ded01667e4e84bc259c522670..241183650819a700b9bc36e48c49c5d16c561412 100644 (file)
@@ -66,14 +66,3 @@ void widestring::operator= (const char *from)
        free(from_buf);
        delete[] to_buf;
 }
-
-namespace pqxx
-{
-
-template<>
-void from_string<widestring>(const char *from, widestring &to)
-{
-       to = from;
-}
-
-}
index 67ffdbb7090864741f717d921581aa6e4fb882c0..86113ffff80e7bd9bea7787b50cb0e888be76df4 100644 (file)
@@ -2,6 +2,7 @@
 #define _WIDESTRING_H 1
 
 #include <string>
+#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<widestring>(const char *from, widestring &to)
+{
+       to = from;
+}
+
+}
+
 #endif /* !defined(_WIDESTRING_H) */