Skip to content

Commit 719e7e7

Browse files
authored
[mypyc] Add Python 3.12 feature macro (#15465)
It's currently unused but I have other PRs that will need this. We can later make this more general and support things like "are we running on Python 3.12 beta 2 or later", but this seems good enough for now.
1 parent 32d14ed commit 719e7e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypyc/lib-rt/mypyc_util.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,7 @@ static inline CPyTagged CPyTagged_ShortFromSsize_t(Py_ssize_t x) {
6969
return x << 1;
7070
}
7171

72+
// Are we targeting Python 3.12 or newer?
73+
#define CPY_3_12_FEATURES (PY_VERSION_HEX >= 0x030c0000)
74+
7275
#endif

0 commit comments

Comments
 (0)