@@ -1219,7 +1219,7 @@ _Py_call_instrumentation_instruction(PyThreadState *tstate, _PyInterpreterFrame*
1219
1219
PyObject *
1220
1220
_PyMonitoring_RegisterCallback (int tool_id , int event_id , PyObject * obj )
1221
1221
{
1222
- PyInterpreterState * is = _PyInterpreterState_Get ();
1222
+ PyInterpreterState * is = _PyInterpreterState_GET ();
1223
1223
assert (0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS );
1224
1224
assert (0 <= event_id && event_id < PY_MONITORING_EVENTS );
1225
1225
PyObject * callback = is -> monitoring_callables [tool_id ][event_id ];
@@ -1678,7 +1678,7 @@ int
1678
1678
_PyMonitoring_SetEvents (int tool_id , _PyMonitoringEventSet events )
1679
1679
{
1680
1680
assert (0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS );
1681
- PyInterpreterState * interp = _PyInterpreterState_Get ();
1681
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
1682
1682
assert (events < (1 << PY_MONITORING_UNGROUPED_EVENTS ));
1683
1683
if (check_tool (interp , tool_id )) {
1684
1684
return -1 ;
@@ -1696,7 +1696,7 @@ int
1696
1696
_PyMonitoring_SetLocalEvents (PyCodeObject * code , int tool_id , _PyMonitoringEventSet events )
1697
1697
{
1698
1698
assert (0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS );
1699
- PyInterpreterState * interp = _PyInterpreterState_Get ();
1699
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
1700
1700
assert (events < (1 << PY_MONITORING_UNGROUPED_EVENTS ));
1701
1701
if (check_tool (interp , tool_id )) {
1702
1702
return -1 ;
@@ -1758,7 +1758,7 @@ monitoring_use_tool_id_impl(PyObject *module, int tool_id, PyObject *name)
1758
1758
PyErr_SetString (PyExc_ValueError , "tool name must be a str" );
1759
1759
return NULL ;
1760
1760
}
1761
- PyInterpreterState * interp = _PyInterpreterState_Get ();
1761
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
1762
1762
if (interp -> monitoring_tool_names [tool_id ] != NULL ) {
1763
1763
PyErr_Format (PyExc_ValueError , "tool %d is already in use" , tool_id );
1764
1764
return NULL ;
@@ -1782,7 +1782,7 @@ monitoring_free_tool_id_impl(PyObject *module, int tool_id)
1782
1782
if (check_valid_tool (tool_id )) {
1783
1783
return NULL ;
1784
1784
}
1785
- PyInterpreterState * interp = _PyInterpreterState_Get ();
1785
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
1786
1786
Py_CLEAR (interp -> monitoring_tool_names [tool_id ]);
1787
1787
Py_RETURN_NONE ;
1788
1788
}
@@ -1804,7 +1804,7 @@ monitoring_get_tool_impl(PyObject *module, int tool_id)
1804
1804
if (check_valid_tool (tool_id )) {
1805
1805
return NULL ;
1806
1806
}
1807
- PyInterpreterState * interp = _PyInterpreterState_Get ();
1807
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
1808
1808
PyObject * name = interp -> monitoring_tool_names [tool_id ];
1809
1809
if (name == NULL ) {
1810
1810
Py_RETURN_NONE ;
@@ -1865,7 +1865,7 @@ monitoring_get_events_impl(PyObject *module, int tool_id)
1865
1865
if (check_valid_tool (tool_id )) {
1866
1866
return -1 ;
1867
1867
}
1868
- _Py_Monitors * m = & _PyInterpreterState_Get ()-> monitors ;
1868
+ _Py_Monitors * m = & _PyInterpreterState_GET ()-> monitors ;
1869
1869
_PyMonitoringEventSet event_set = get_events (m , tool_id );
1870
1870
return event_set ;
1871
1871
}
@@ -1990,7 +1990,7 @@ monitoring_restart_events_impl(PyObject *module)
1990
1990
* last restart version > instrumented version for all code objects
1991
1991
* last restart version < current version
1992
1992
*/
1993
- PyInterpreterState * interp = _PyInterpreterState_Get ();
1993
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
1994
1994
interp -> last_restart_version = interp -> monitoring_version + 1 ;
1995
1995
interp -> monitoring_version = interp -> last_restart_version + 1 ;
1996
1996
if (instrument_all_executing_code_objects (interp )) {
@@ -2038,7 +2038,7 @@ static PyObject *
2038
2038
monitoring__all_events_impl (PyObject * module )
2039
2039
/*[clinic end generated code: output=6b7581e2dbb690f6 input=62ee9672c17b7f0e]*/
2040
2040
{
2041
- PyInterpreterState * interp = _PyInterpreterState_Get ();
2041
+ PyInterpreterState * interp = _PyInterpreterState_GET ();
2042
2042
PyObject * res = PyDict_New ();
2043
2043
if (res == NULL ) {
2044
2044
return NULL ;
0 commit comments