File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -193,13 +193,18 @@ extern void _PyEval_DeactivateOpCache(void);
193193
194194/* --- _Py_EnterRecursiveCall() ----------------------------------------- */
195195
196+ static return_pointer_as_int (char * p ) {
197+ return (uintptr_t )p ;
198+ }
199+
196200static inline uintptr_t
197201_Py_get_machine_stack_pointer (void ) {
198202#if _Py__has_builtin (__builtin_frame_address )
199203 return (uintptr_t )__builtin_frame_address (0 );
200204#else
201205 char here ;
202- return (uintptr_t )& here ;
206+ /* Avoid compiler warning about returning stack address */
207+ return return_pointer_as_int (& here );
203208#endif
204209}
205210
Original file line number Diff line number Diff line change @@ -374,10 +374,8 @@ _Py_InitializeRecursionLimits(PyThreadState *tstate)
374374 _tstate -> c_stack_top = base + stack_size ;
375375 _tstate -> c_stack_soft_limit = base + PYOS_STACK_MARGIN_BYTES * 2 ;
376376 _tstate -> c_stack_hard_limit = base + PYOS_STACK_MARGIN_BYTES ;
377- #ifndef _AIX
378377 assert (_tstate -> c_stack_soft_limit < here_addr );
379378 assert (here_addr < _tstate -> c_stack_top );
380- #endif
381379 return ;
382380 }
383381# endif
You can’t perform that action at this time.
0 commit comments