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 @@ -496,7 +496,7 @@ struct _py_func_state {
496496
497497/* For now we hard-code this to a value for which we are confident
498498 all the static builtin types will fit (for all builds). */
499- #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 201
499+ #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 202
500500#define _Py_MAX_MANAGED_STATIC_EXT_TYPES 10
501501#define _Py_MAX_MANAGED_STATIC_TYPES \
502502 (_Py_MAX_MANAGED_STATIC_BUILTIN_TYPES + _Py_MAX_MANAGED_STATIC_EXT_TYPES)
Original file line number Diff line number Diff line change @@ -2970,6 +2970,8 @@ static PyMethodDef module_functions[] = {
29702970static int
29712971module_exec (PyObject * module )
29722972{
2973+ PyInterpreterState * interp = PyInterpreterState_Get ();
2974+
29732975 if (_PyTestInternalCapi_Init_Lock (module ) < 0 ) {
29742976 return 1 ;
29752977 }
@@ -3011,9 +3013,10 @@ module_exec(PyObject *module)
30113013 return 1 ;
30123014 }
30133015
3016+ // + 1 more due to one loop spent on tracing.
3017+ unsigned long threshold = interp -> opt_config .jump_backward_initial_value + 2 ;
30143018 if (PyModule_Add (module , "TIER2_THRESHOLD" ,
3015- // + 1 more due to one loop spent on tracing.
3016- PyLong_FromLong (JUMP_BACKWARD_INITIAL_VALUE + 2 )) < 0 ) {
3019+ PyLong_FromUnsignedLong (threshold )) < 0 ) {
30173020 return 1 ;
30183021 }
30193022
You can’t perform that action at this time.
0 commit comments