Slice tests failing on MSVC 7.1, 8.0
According to the automated regression testers here: http://www.meta-comm.com/engineering/boost-regression/developer/python_.html The slice test is failing on MSVC 7.1 and 8.0. First off, do you expect them to pass on these compilers? If so, the problem is that C++ functions that take a boost::python::slice argument raise a Boost.Python.AgumentError when called with a Python-created slice. The errors in the log take the form: ArgumentError: Python argument types in slice_ext.check_slice_get_indicies(slice) did not match C++ signature: check_slice_get_indicies(class boost::python::slice) Any ideas? Thanks, -Jonathan
Jonathan Brandmeyer <jbrandmeyer@earthlink.net> writes:
According to the automated regression testers here: http://www.meta-comm.com/engineering/boost-regression/developer/python_.html
The slice test is failing on MSVC 7.1 and 8.0. First off, do you expect them to pass on these compilers?
They're your tests, aren't they?? Don't you expect them to pass?
If so, the problem is that C++ functions that take a boost::python::slice argument raise a Boost.Python.AgumentError when called with a Python-created slice.
The errors in the log take the form: ArgumentError: Python argument types in slice_ext.check_slice_get_indicies(slice) did not match C++ signature: check_slice_get_indicies(class boost::python::slice)
Any ideas?
Did you register a converter that allows Python-created slices to be passed where boost::python::slice is required? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
On Thu, 2004-08-26 at 10:12, David Abrahams wrote:
Jonathan Brandmeyer <jbrandmeyer@earthlink.net> writes:
According to the automated regression testers here: http://www.meta-comm.com/engineering/boost-regression/developer/python_.html
The slice test is failing on MSVC 7.1 and 8.0. First off, do you expect them to pass on these compilers?
They're your tests, aren't they?? Don't you expect them to pass?
Yes, of course I do. I was hoping someone more familiar with MS's toolchain might be aware of some quirk that would lead to the error I listed below.
If so, the problem is that C++ functions that take a boost::python::slice argument raise a Boost.Python.AgumentError when called with a Python-created slice.
The errors in the log take the form: ArgumentError: Python argument types in slice_ext.check_slice_get_indicies(slice) did not match C++ signature: check_slice_get_indicies(class boost::python::slice)
Any ideas?
Did you register a converter that allows Python-created slices to be passed where boost::python::slice is required?
Not explicitly, and maybe not at all. I expected the specialization of object_manager_traits<> to make it Just Work. It seems to be enough with several other platforms and compilers. At any rate, I managed to get the "Visual C++ Toolkit 2003" installed and working on my system and committed a workaround. It turns out that the following test compiles and links fine with MSVC 7.1, but fails at runtime when calling the exported function: #include <boost/python.hpp> using namespace boost::python; void accept_slice_arg( const slice ) { return; } BOOST_PYTHON_MODULE(slice_test) { def( "accept_slice_arg", &accept_slice_arg); } The workaround is to add a prototype that does not have the 'const' qualifier in the function argument - just like with MSVC 7.0 and earlier. Is there a reasonable way to make code like the above work for user programs? As far as I can tell, all of the object manager classes are affected. Thanks, -Jonathan
Jonathan Brandmeyer <jbrandmeyer@earthlink.net> writes:
On Thu, 2004-08-26 at 10:12, David Abrahams wrote:
Jonathan Brandmeyer <jbrandmeyer@earthlink.net> writes:
At any rate, I managed to get the "Visual C++ Toolkit 2003" installed and working on my system and committed a workaround. It turns out that the following test compiles and links fine with MSVC 7.1, but fails at runtime when calling the exported function:
#include <boost/python.hpp> using namespace boost::python;
void accept_slice_arg( const slice ) { return; }
BOOST_PYTHON_MODULE(slice_test) { def( "accept_slice_arg", &accept_slice_arg); }
The workaround is to add a prototype that does not have the 'const' qualifier in the function argument - just like with MSVC 7.0 and earlier.
Yoikes, that's terrible! I thought they fixed that one for vc7.1. Not even for 8.0???
Is there a reasonable way to make code like the above work for user programs? As far as I can tell, all of the object manager classes are affected.
I declined to try to work around that compiler bug in the library; I just told people to make sure that the declaration of the function didn't use const (it has no effect there anyway). I don't know how hard it would be to make the library adjust automatically. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
On Thu, 2004-08-26 at 20:47, David Abrahams wrote:
Jonathan Brandmeyer <jbrandmeyer@earthlink.net> writes:
The workaround is to add a prototype that does not have the 'const' qualifier in the function argument - just like with MSVC 7.0 and earlier.
Yoikes, that's terrible! I thought they fixed that one for vc7.1. Not even for 8.0???
I haven't personally tried with 8.0, but since the error message in the regression report was verbatim identical to the one for 7.1, I think it is broken for 8.0 as well. Intel C++ 7.1 on Windows is "compatable with" this bug, too. -Jonathan
participants (2)
-
David Abrahams -
Jonathan Brandmeyer