File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ extern void _PyEval_DeactivateOpCache(void);
196
196
197
197
/* --- _Py_EnterRecursiveCall() ----------------------------------------- */
198
198
199
- #if !_Py__has_builtin (__builtin_frame_address )
199
+ #if !_Py__has_builtin (__builtin_frame_address ) && !defined( _MSC_VER )
200
200
static uintptr_t return_pointer_as_int (char * p ) {
201
201
return (uintptr_t )p ;
202
202
}
@@ -206,6 +206,8 @@ static inline uintptr_t
206
206
_Py_get_machine_stack_pointer (void ) {
207
207
#if _Py__has_builtin (__builtin_frame_address )
208
208
return (uintptr_t )__builtin_frame_address (0 );
209
+ #elif defined(_MSC_VER )
210
+ return (uintptr_t )_AddressOfReturnAddress ();
209
211
#else
210
212
char here ;
211
213
/* Avoid compiler warning about returning stack address */
You can’t perform that action at this time.
0 commit comments