File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -522,6 +522,13 @@ is_env_enabled(const char *env_name)
522522 return env && * env != '\0' && * env != '0' ;
523523}
524524
525+ static inline bool
526+ is_env_disabled (const char * env_name )
527+ {
528+ char * env = Py_GETENV (env_name );
529+ return env != NULL && * env == '0' ;
530+ }
531+
525532static inline void
526533init_policy (uint16_t * target , const char * env_name , uint16_t default_value ,
527534 long min_value , long max_value )
@@ -619,7 +626,7 @@ init_interpreter(PyInterpreterState *interp,
619626 SIDE_EXIT_INITIAL_BACKOFF , 0 , MAX_BACKOFF );
620627
621628 interp -> opt_config .specialization_enabled = !is_env_enabled ("PYTHON_SPECIALIZATION_OFF" );
622- interp -> opt_config .uops_optimize_enabled = is_env_enabled ("PYTHON_UOPS_OPTIMIZE" );
629+ interp -> opt_config .uops_optimize_enabled = ! is_env_disabled ("PYTHON_UOPS_OPTIMIZE" );
623630 if (interp != & runtime -> _main_interpreter ) {
624631 /* Fix the self-referential, statically initialized fields. */
625632 interp -> dtoa = (struct _dtoa_state )_dtoa_state_INIT (interp );
You can’t perform that action at this time.
0 commit comments