Skip to content

Commit e00d0a8

Browse files
committed
Tweaking msvc.
1 parent 0c22f32 commit e00d0a8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/greenlet/greenlet_msvc_compat.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
* but still crash. We have that problem on all platforms though. It's just worse
2424
* here because we have to keep copying the updated definitions.
2525
*/
26-
26+
#include <Python.h>
2727
#include "greenlet_cpython_compat.hpp"
2828

29-
#if GREENLET_314
29+
// This file is only included on 3.14+
30+
31+
extern "C" {
32+
3033
// pycore_code.h ----------------
3134
#define _PyCode_CODE(CO) _Py_RVALUE((_Py_CODEUNIT *)(CO)->co_code_adaptive)
3235
// End pycore_code.h ----------
@@ -72,7 +75,7 @@ _PyFrame_GetBytecode(_PyInterpreterFrame *f)
7275
#endif
7376
}
7477

75-
static inline bool _Py_NO_SANITIZE_THREAD
78+
static inline bool //_Py_NO_SANITIZE_THREAD
7679
_PyFrame_IsIncomplete(_PyInterpreterFrame *frame)
7780
{
7881
if (frame->owner >= FRAME_OWNED_BY_INTERPRETER) {
@@ -84,5 +87,5 @@ _PyFrame_IsIncomplete(_PyInterpreterFrame *frame)
8487
}
8588
// pycore_interpframe.h ----------
8689

87-
#endif // GREENLET_314
88-
#endif
90+
}
91+
#endif // GREENLET_MSVC_COMPAT_HPP

0 commit comments

Comments
 (0)