acm's picture

 
StringDictionary used to be defined in pion/net/HTTPTypes.hpp, and was scoped to the pion::net::HTTPTypes struct. Sometime between pion 2.2.8 and 3.0.7, the definition of StringDictionary was moved to pion/common/PionHashMap.hpp, where it is now at global scope. Is there a particular reason the new definition is not scoped to the ::pion namespace like all other PION types?
 
The same issue occurs for CaseInsensitiveEqual, CaseInsensitiveHash, and CaseInsensitiveLess, which all used to live in HTTPTypes, and were therefore scoped, but are now made visible at global scope in pion/common/PionHashMap.hpp.
 
I just did a 'make all check' of today's SVN head after moving the classes and typedefs in PionHashMap.hpp into the ::pion namespace (and adding 'using namespace pion' to the HTTPTypes unit test), and after that change everything builds and all tests pass.
Thanks!
 
 
Index: include/pion/PionHashMap.hpp
===================================================================
--- include/pion/PionHashMap.hpp (revision 582)
+++ include/pion/PionHashMap.hpp (working copy)
@@ -48,6 +48,7 @@
  #endif
 #endif
 
+namespace pion { // begin namespace pion
 
 /// returns true if two strings are equal (ignoring case)
 struct CaseInsensitiveEqual {
@@ -117,5 +118,6 @@
 /// data type for a dictionary of strings
 //typedef PION_HASH_MULTIMAP<std::string, std::string, PION_HASH_STRING > StringDictionary;
 
+} // end namespace pion
 
 #endif

Index: net/tests/HTTPTypesTests.cpp
===================================================================
--- net/tests/HTTPTypesTests.cpp (revision 790)
+++ net/tests/HTTPTypesTests.cpp (working copy)
@@ -12,6 +12,7 @@
 #include <pion/PionUnitTestDefs.hpp>
 #include <boost/test/unit_test.hpp>
 
+using namespace pion;
 using namespace pion::net;
 
 BOOST_FIXTURE_TEST_SUITE(HTTPTypes_S, HTTPTypes)

 

Mike Dickey's picture
That was a mistake -- it's

That was a mistake -- it's fixed now in svn, will be included in 3.0.9

Submitted by Mike Dickey on Wed, 04/14/2010 - 13:31.