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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user