mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 22:52:01 +00:00
future-proof Python version check from commit 31680e6
(@lgritz)
This commit is contained in:
parent
82cf793588
commit
f3109d8419
@ -1566,7 +1566,7 @@ public:
|
|||||||
#if PY_MAJOR_VERSION < 3
|
#if PY_MAJOR_VERSION < 3
|
||||||
def("__long__", [](Type value) { return (Scalar) value; });
|
def("__long__", [](Type value) { return (Scalar) value; });
|
||||||
#endif
|
#endif
|
||||||
#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 8
|
#if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8)
|
||||||
def("__index__", [](Type value) { return (Scalar) value; });
|
def("__index__", [](Type value) { return (Scalar) value; });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user