[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/boostorg/python/python313/src/object_operators.cpp [Back]  [Original]

// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include 
#include 

namespace boost { namespace python { namespace api {

# define BOOST_PYTHON_COMPARE_OP(op, opid)                              \
BOOST_PYTHON_DECL object operator op(object const& l, object const& r)  \
{                                                                       \
    return object(                                                      \
        detail::new_reference(                                          \
            PyObject_RichCompare(                                       \
                l.ptr(), r.ptr(), opid))                                \
            );                                                          \
}
BOOST_PYTHON_COMPARE_OP(>, Py_GT)
BOOST_PYTHON_COMPARE_OP(>=, Py_GE)
BOOST_PYTHON_COMPARE_OP(

Web Proxy Viewer  |  New URL  |  Original Page