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);
196196
197197/* --- _Py_EnterRecursiveCall() ----------------------------------------- */
198198
199- #if !_Py__has_builtin (__builtin_frame_address )
199+ #if !_Py__has_builtin (__builtin_frame_address ) && !defined( _MSC_VER )
200200static uintptr_t return_pointer_as_int (char * p ) {
201201 return (uintptr_t )p ;
202202}
@@ -206,6 +206,8 @@ static inline uintptr_t
206206_Py_get_machine_stack_pointer (void ) {
207207#if _Py__has_builtin (__builtin_frame_address )
208208 return (uintptr_t )__builtin_frame_address (0 );
209+ #elif defined(_MSC_VER )
210+ return (uintptr_t )_AddressOfReturnAddress ();
209211#else
210212 char here ;
211213 /* Avoid compiler warning about returning stack address */
You can’t perform that action at this time.
0 commit comments