Author: wyoung
Date: Sat Jun 23 00:17:30 2007
New Revision: 1599

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1599&view=rev
Log:
More embedded null tweaks

Modified:
    trunk/lib/coldata.h

Modified: trunk/lib/coldata.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/coldata.h?rev=1599&r1=1598&r2=1599&view=diff
==============================================================================
--- trunk/lib/coldata.h (original)
+++ trunk/lib/coldata.h Sat Jun 23 00:17:30 2007
@@ -173,9 +173,8 @@
        /// \brief Returns true if this object is a SQL null.
        inline const bool is_null() const { return null_; }
        
-       /// \brief Returns a const char pointer to the string form of
-       /// this object's data.
-       operator cchar*() const { return c_str(); }
+       /// \brief Returns a const char pointer to the object's raw data
+       operator cchar*() const { return data(); }
        
        /// \brief Converts this object's string data to a signed char
        operator signed char() const
@@ -326,7 +325,7 @@
 template <class Str> template <class Type>
 Type ColData_Tmpl<Str>::conv(Type /* dummy */) const
 {
-       std::string strbuf(*this);
+       std::string strbuf(data(), length());
        strip_all_blanks(strbuf);
        std::string::size_type len = strbuf.size();
        const char* str = strbuf.c_str();


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to