Skip to content

Commit a8e2452

Browse files
committed
Merge branch 'pythongh-119333-notify' into HEAD
2 parents 83ae1bd + efab225 commit a8e2452

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Python/context.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ context_event_name(PyContextEvent event) {
112112
Py_UNREACHABLE();
113113
}
114114

115-
static void notify_context_watchers(PyContextEvent event, PyContext *ctx, PyThreadState *ts)
115+
static void
116+
notify_context_watchers(PyThreadState *ts, PyContextEvent event, PyContext *ctx)
116117
{
117118
assert(Py_REFCNT(ctx) > 0);
118119
PyInterpreterState *interp = ts->interp;
@@ -195,7 +196,7 @@ _PyContext_Enter(PyThreadState *ts, PyObject *octx)
195196
ts->context = Py_NewRef(ctx);
196197
ts->context_ver++;
197198

198-
notify_context_watchers(Py_CONTEXT_EVENT_ENTER, ctx, ts);
199+
notify_context_watchers(ts, Py_CONTEXT_EVENT_ENTER, ctx);
199200
return 0;
200201
}
201202

@@ -229,7 +230,7 @@ _PyContext_Exit(PyThreadState *ts, PyObject *octx)
229230
return -1;
230231
}
231232

232-
notify_context_watchers(Py_CONTEXT_EVENT_EXIT, ctx, ts);
233+
notify_context_watchers(ts, Py_CONTEXT_EVENT_EXIT, ctx);
233234
Py_SETREF(ts->context, (PyObject *)ctx->ctx_prev);
234235
ts->context_ver++;
235236

0 commit comments

Comments
 (0)