patch for map_indexing_suite.hpp
Hi Joel, I found a minor bug in map_indexing_suite.hpp: Index: suite/indexing/map_indexing_suite.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/python/suite/indexing/map_indexing_suite.hpp,v retrieving revision 1.5 diff -u -r1.5 map_indexing_suite.hpp --- suite/indexing/map_indexing_suite.hpp 4 May 2004 09:41:01 -00001.5 +++ suite/indexing/map_indexing_suite.hpp 4 Jul 2004 07:09:18 -0000 @@ -73,7 +73,9 @@ { // Wrap the map's element (value_type) std::string elem_name = "map_indexing_suite_"; - elem_name += cl.ptr()->ob_type->tp_name; // the class name + object class_name(cl.attr("__name__")); + extract<std::string> class_name_extractor(class_name); + elem_name += class_name_extractor(); elem_name += "_entry"; typedef typename mpl::if_< cl.ptr()->ob_type->tp_name always returns "Boost.Python.class", but cl.attr("__name__") does the right thing. I've tested the patch on all our platforms. The only issue I found is that Visual C++ 6.6 issues the infamous "compiler limit : internal structure overflow" message, but it does so even without the patch. I've made a second patch for map_indexing_suite.py to verify that the first patch works as expected: Index: map_indexing_suite.py =================================================================== RCS file: /cvsroot/boost/boost/libs/python/test/map_indexing_suite.py,v retrieving revision 1.2 diff -u -r1.2 map_indexing_suite.py --- map_indexing_suite.py 26 Aug 2003 13:11:51 -0000 1.2 +++ map_indexing_suite.py 4 Jul 2004 07:17:52 -0000 @@ -5,6 +5,9 @@ #####################################################################
from map_indexing_suite_ext import * +>>> assert "map_indexing_suite_IntMap_entry" in dir() +>>> assert "map_indexing_suite_TestMap_entry" in dir() +>>> assert "map_indexing_suite_XMap_entry" in dir() x = X('hi') x hi
OK to check this in? Thanks, Ralf __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail
Ralf W. Grosse-Kunstleve wrote:
Hi Joel,
I found a minor bug in map_indexing_suite.hpp:
[...]
OK to check this in?
Sounds good. Thanks! -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
participants (2)
-
Joel de Guzman -
Ralf W. Grosse-Kunstleve