Author: wyoung
Date: Tue Mar 24 19:12:14 2009
New Revision: 2493

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2493&view=rev
Log:
Removed the dependency of stadapter.h on sql_types.h, just to get
sql_tinyint*.  #including tinyint.h instead, and using equivalent types
to what sql_types.h defines.  This is necessary because sql_types.h
should be one of the last things included from mysql++.h, so it can
define sql_* equivalents for everything else in MySQL++, which means all
those other things need to be #included by that point.

Modified:
    trunk/lib/stadapter.cpp
    trunk/lib/stadapter.h

Modified: trunk/lib/stadapter.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/stadapter.cpp?rev=2493&r1=2492&r2=2493&view=diff
==============================================================================
--- trunk/lib/stadapter.cpp (original)
+++ trunk/lib/stadapter.cpp Tue Mar 24 19:12:14 2009
@@ -106,29 +106,29 @@
 }
 #endif
 
-SQLTypeAdapter::SQLTypeAdapter(sql_tinyint i) :
-buffer_(new SQLBuffer(stream2string(i), typeid(i), false)),
-is_processed_(false)
-{
-}
-
-#if !defined(DOXYGEN_IGNORE)
-SQLTypeAdapter::SQLTypeAdapter(Null<sql_tinyint> i) :
-buffer_(new SQLBuffer(i.is_null ? null_str : stream2string(i),
-               i.is_null ? typeid(void) : typeid(i.data), i.is_null)),
-is_processed_(false)
-{
-}
-#endif
-
-SQLTypeAdapter::SQLTypeAdapter(sql_tinyint_unsigned i) :
-buffer_(new SQLBuffer(stream2string(i), typeid(i), false)),
-is_processed_(false)
-{
-}
-
-#if !defined(DOXYGEN_IGNORE)
-SQLTypeAdapter::SQLTypeAdapter(Null<sql_tinyint_unsigned> i) :
+SQLTypeAdapter::SQLTypeAdapter(tiny_int<signed char> i) :
+buffer_(new SQLBuffer(stream2string(i), typeid(i), false)),
+is_processed_(false)
+{
+}
+
+#if !defined(DOXYGEN_IGNORE)
+SQLTypeAdapter::SQLTypeAdapter(Null<tiny_int<signed char> > i) :
+buffer_(new SQLBuffer(i.is_null ? null_str : stream2string(i),
+               i.is_null ? typeid(void) : typeid(i.data), i.is_null)),
+is_processed_(false)
+{
+}
+#endif
+
+SQLTypeAdapter::SQLTypeAdapter(tiny_int<unsigned char> i) :
+buffer_(new SQLBuffer(stream2string(i), typeid(i), false)),
+is_processed_(false)
+{
+}
+
+#if !defined(DOXYGEN_IGNORE)
+SQLTypeAdapter::SQLTypeAdapter(Null<tiny_int<unsigned char> > i) :
 buffer_(new SQLBuffer(i.is_null ? null_str : stream2string(i),
                i.is_null ? typeid(void) : typeid(i.data), i.is_null)),
 is_processed_(false)

Modified: trunk/lib/stadapter.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/stadapter.h?rev=2493&r1=2492&r2=2493&view=diff
==============================================================================
--- trunk/lib/stadapter.h (original)
+++ trunk/lib/stadapter.h Tue Mar 24 19:12:14 2009
@@ -3,7 +3,7 @@
 
 /***********************************************************************
  Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
- (c) 2004-2008 by Educational Technology Resources, Inc.  Others may
+ (c) 2004-2009 by Educational Technology Resources, Inc.  Others may
  also hold copyrights on code in this file.  See the CREDITS.txt file
  in the top directory of the distribution for details.
 
@@ -33,7 +33,7 @@
 #include "datetime.h"
 #include "null.h"
 #include "sql_buffer.h"
-#include "sql_types.h"
+#include "tiny_int.h"
 
 #include <stdexcept>
 #include <string>
@@ -113,11 +113,11 @@
        SQLTypeAdapter(char c);
 
        /// \brief Create a string representation of SQL \c TINYINT
-       SQLTypeAdapter(sql_tinyint i);
+       SQLTypeAdapter(tiny_int<signed char> i);
 
        /// \brief Create a string representation of SQL \c TINYINT
        /// \c UNSIGNED
-       SQLTypeAdapter(sql_tinyint_unsigned i);
+       SQLTypeAdapter(tiny_int<unsigned char> i);
 
        /// \brief Create a string representation of a \c short \c int value
        SQLTypeAdapter(short i);
@@ -298,8 +298,8 @@
        SQLTypeAdapter(const Null<std::string>& str, bool processed = false);
        SQLTypeAdapter(const Null<String>& str, bool processed = false);
        SQLTypeAdapter(Null<char> c);
-       SQLTypeAdapter(Null<sql_tinyint> i);
-       SQLTypeAdapter(Null<sql_tinyint_unsigned> i);
+       SQLTypeAdapter(Null< tiny_int<signed char> > i);
+       SQLTypeAdapter(Null< tiny_int<unsigned char> > i);
        SQLTypeAdapter(Null<short> i);
        SQLTypeAdapter(Null<unsigned short> i);
        SQLTypeAdapter(Null<int> i);


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

Reply via email to