mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-26 00:46:01 +08: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
|
||||
def("__long__", [](Type value) { return (Scalar) value; });
|
||||
#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; });
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user