File tree 1 file changed +15
-3
lines changed
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):
98
98
# See also: edgedb/edgedb#2222
99
99
Py_INCREF(method)
100
100
try :
101
- return context.run(method)
101
+ Context_Enter(context)
102
+ try :
103
+ return method()
104
+ finally :
105
+ Context_Exit(context)
102
106
finally :
103
107
Py_DECREF(method)
104
108
105
109
106
110
cdef inline run_in_context1(context, method, arg):
107
111
Py_INCREF(method)
108
112
try :
109
- return context.run(method, arg)
113
+ Context_Enter(context)
114
+ try :
115
+ return method(arg)
116
+ finally :
117
+ Context_Exit(context)
110
118
finally :
111
119
Py_DECREF(method)
112
120
113
121
114
122
cdef inline run_in_context2(context, method, arg1, arg2):
115
123
Py_INCREF(method)
116
124
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)
118
130
finally :
119
131
Py_DECREF(method)
120
132
You can’t perform that action at this time.
0 commit comments