Skip to content

Commit 82d1259

Browse files
Brandt's changes
Co-Authored-By: Brandt Bucher <[email protected]>
1 parent 9f05f98 commit 82d1259

File tree

3 files changed

+240
-237
lines changed

3 files changed

+240
-237
lines changed

Python/ceval_macros.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,14 @@
7979
#endif
8080

8181
#if Py_TAIL_CALL_INTERP
82-
// Note: [[clang::musttail]] works for GCC 15, but not __attribute__((musttail)) at the moment.
83-
# define Py_MUSTTAIL [[clang::musttail]]
84-
# define Py_PRESERVE_NONE_CC __attribute__((preserve_none))
82+
# ifdef _MSC_VER
83+
# define Py_MUSTTAIL [[msvc::musttail]]
84+
# define Py_PRESERVE_NONE_CC __preserve_none
85+
# else
86+
# define Py_MUSTTAIL [[clang::musttail]]
87+
# define Py_PRESERVE_NONE_CC __attribute__((preserve_none))
8588
Py_PRESERVE_NONE_CC typedef PyObject* (*py_tail_call_funcptr)(TAIL_CALL_PARAMS);
86-
89+
# endif
8790
# define TARGET(op) Py_PRESERVE_NONE_CC PyObject *_TAIL_CALL_##op(TAIL_CALL_PARAMS)
8891
# define DISPATCH_GOTO() \
8992
do { \

0 commit comments

Comments
 (0)