2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-22 17:32:55 +00:00

Visual C++ 6 compatibility

[SVN r32288]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2006-01-11 19:58:55 +00:00
parent 2f9323d9e9
commit efcd2833f1

View File

@@ -84,10 +84,14 @@ struct with_custodian_and_ward_postcall : BasePolicy_
static PyObject* postcall(ArgumentPackage const& args_, PyObject* result)
{
std::size_t arity_ = detail::arity(args_);
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
if ( custodian > arity_ || ward > arity_ )
#else
// check if either custodian or ward exceeds the arity
// (this weird formulation avoids "always false" warnings
// for arity_ = 0)
if ( std::max(custodian, ward) > arity_ )
#endif
{
PyErr_SetString(
PyExc_IndexError