Author: wyoung
Date: Tue Feb 19 21:40:45 2008
New Revision: 2211
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2211&view=rev
Log:
- Restored ulong typedef: required to make MySQL C API headers happy.
Added a comment explaining why it can't be removed.
- Replaced a few stray uint typedef uses
Modified:
trunk/lib/common.h
trunk/lib/field_names.cpp
trunk/lib/field_names.h
Modified: trunk/lib/common.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/common.h?rev=2211&r1=2210&r2=2211&view=diff
==============================================================================
--- trunk/lib/common.h (original)
+++ trunk/lib/common.h Tue Feb 19 21:40:45 2008
@@ -153,6 +153,15 @@
#endif
#endif // !defined(DOXYGEN_IGNORE)
+#if !defined(MYSQLPP_NO_UNSIGNED_INT_TYPES)
+/// \brief Contraction for 'unsigned long'
+///
+/// This is not to be used within the library or directly by end-user
+/// code. It exists to make the MySQL C API headers happy: my_global.h
+/// defines it, but we can't use it in MySQL++, so we do it ourselves.
+typedef unsigned long ulong;
+#endif
+
} // end namespace mysqlpp
// The MySQL headers define these macros, which is completely wrong in a
Modified: trunk/lib/field_names.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.cpp?rev=2211&r1=2210&r2=2211&view=diff
==============================================================================
--- trunk/lib/field_names.cpp (original)
+++ trunk/lib/field_names.cpp Tue Feb 19 21:40:45 2008
@@ -48,12 +48,12 @@
}
-uint
+unsigned int
FieldNames::operator [](const std::string& s) const
{
std::string temp(s);
str_to_lwr(temp);
- return static_cast<uint>(std::find(begin(), end(), temp) - begin());
+ return static_cast<unsigned int>(std::find(begin(), end(), temp) -
begin());
}
} // end namespace mysqlpp
Modified: trunk/lib/field_names.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.h?rev=2211&r1=2210&r2=2211&view=diff
==============================================================================
--- trunk/lib/field_names.h (original)
+++ trunk/lib/field_names.h Tue Feb 19 21:40:45 2008
@@ -94,7 +94,7 @@
}
/// \brief Get the index number of a field given its name
- uint operator [](const std::string& s) const;
+ unsigned int operator [](const std::string& s) const;
private:
void init(const ResultBase* res);
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits