File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -98,23 +98,35 @@ cdef inline run_in_context(context, method):
9898 # See also: edgedb/edgedb#2222
9999 Py_INCREF(method)
100100 try :
101- return context.run(method)
101+ Context_Enter(context)
102+ try :
103+ return method()
104+ finally :
105+ Context_Exit(context)
102106 finally :
103107 Py_DECREF(method)
104108
105109
106110cdef inline run_in_context1(context, method, arg):
107111 Py_INCREF(method)
108112 try :
109- return context.run(method, arg)
113+ Context_Enter(context)
114+ try :
115+ return method(arg)
116+ finally :
117+ Context_Exit(context)
110118 finally :
111119 Py_DECREF(method)
112120
113121
114122cdef inline run_in_context2(context, method, arg1, arg2):
115123 Py_INCREF(method)
116124 try :
117- return context.run(method, arg1, arg2)
125+ Context_Enter(context)
126+ try :
127+ return method(arg1, arg2)
128+ finally :
129+ Context_Exit(context)
118130 finally :
119131 Py_DECREF(method)
120132
You can’t perform that action at this time.
0 commit comments