Skip to content

Commit 320c697

Browse files
lopuhinfacebook-github-bot
authored andcommitted
Fix PySlice_Unpack not available on PyPy 3.6 yet (#17836)
Summary: This is one of the fixes needed to support compilation on PyPy 3.6, see #17835 Pull Request resolved: #17836 Differential Revision: D14399404 Pulled By: soumith fbshipit-source-id: ca650a6e2066aed86ddd3314a95d0cb3c515c633
1 parent 742568e commit 320c697

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch/csrc/utils/python_compat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
#include <torch/csrc/python_headers.h>
44

5-
#if PY_VERSION_HEX < 0x03060100
5+
// PyPy 3.6 does not yet have PySlice_Unpack
6+
#if PY_VERSION_HEX < 0x03060100 || defined(PYPY_VERSION)
67

78
// PySlice_Unpack not introduced till python 3.6.1
89
// included here for backwards compatibility

0 commit comments

Comments
 (0)