File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change 153153
154154// / Include Python header, disable linking to pythonX_d.lib on Windows in debug mode
155155#if defined(_MSC_VER)
156- # if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 4)
157- # define HAVE_ROUND 1
158- # endif
159156# pragma warning(push)
160157// C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only)
161158# pragma warning(disable: 4505)
Original file line number Diff line number Diff line change @@ -1911,13 +1911,10 @@ template <typename Type> class enum_ : public class_<Type> {
19111911 def (init ([](Scalar i) { return static_cast <Type>(i); }), arg (" value" ));
19121912 def_property_readonly (" value" , [](Type value) { return (Scalar) value; });
19131913 def (" __int__" , [](Type value) { return (Scalar) value; });
1914+ def (" __index__" , [](Type value) { return (Scalar) value; });
19141915 #if PY_MAJOR_VERSION < 3
19151916 def (" __long__" , [](Type value) { return (Scalar) value; });
19161917 #endif
1917- #if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8)
1918- def (" __index__" , [](Type value) { return (Scalar) value; });
1919- #endif
1920-
19211918 attr (" __setstate__" ) = cpp_function (
19221919 [](detail::value_and_holder &v_h, Scalar arg) {
19231920 detail::initimpl::setstate<Base>(v_h, static_cast <Type>(arg),
You can’t perform that action at this time.
0 commit comments