Skip to content

Commit ebac569

Browse files
committed
Merge branch 'pythongh-119333-notify' into HEAD
2 parents e4c27e4 + efab225 commit ebac569

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎Python/context.c‎

Lines changed: 4 additions & 3 deletions
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)